Suchergebnisse für "portc"
PIN_B5 SBIT( PINB, 5 ) #define PIN_B6 SBIT( PINB, 6 ) #define PIN_B7 SBIT( PINB, 7 ) #endif #ifdef PORTC #define PORT_C0 SBIT( PORTC , 0 ) #define PORT_C1 SBIT( PORTC , 1 ) #define PORT_C2 SBIT( PORTC , 2 ) #define PORT_C3 SBIT( PORTC , 3 ) #define PORT_C4 SBIT( PORTC , 4 ) #define PORT_C5 SBIT( PORTC , 5 ) #define PORT_C6 SBIT( PORTC , 6 ) #define PORT_C7 SBIT( PORTC , 7 ) #define DDR_C0 SBIT( DDRC, 0 ) #define DDR_C1 SBIT( DDRC, 1 ) #define DDR_C2 SBIT( DDRC, 2 ) #define DDR_C3 SBIT( DDRC, 3 ) #define DDR_C4 SBIT( DDRC, 4 ) #define
in
„LedMitMehrerenSchaltern“
·
Mikrocontroller und Digitale Elektronik
·
24.07.2014 21:08
Thread
PullUps aktivieren, bei HIGH-aktiven nicht */ #if TASTER_LEVEL ; #else PORTC |= 1 << PC2; PORTC |= 1 << PC3; PORTC |= 1 << PC4; PORTC |= 1 << PC5; #endif /* Timer0 ohne Prescaler starten */ TCCR0 |= (0<<CS02) | (0<<CS01) | (1<<CS00
PB4) | (0<<PB5); DDRC |= (0<<PC0) | (0<<PC1) | (0<<PC2) | (0<<PC3) | (0<<PC4) | (0<<PC5); PORTC |= (1<<PC0) | (1<<PC1) | (1<<PC2) | (1<<PC3) | (1<<PC4) | (1<<PC5); DDRD |= (0<<PD0) | (0<<PD1) | (0<<PD2); PORTD |= (1<<PD0) | (1<<PD1) | (1<<PD2); // Interrupts freigeben
Mikrocontroller und Digitale Elektronik
· Markus Niewerth
· 23.07.2014 13:24
· 2 Antworten
Thread
setzen lcd_enable(); } [/c] Im Header sind die Ports definiert. [c] #define LCD_DATA_PORT PORTC #define LCD_DATA_DDR DDRC #define LCD_DATA0 0 #define LCD_DATA1 1 #define LCD_DATA2 2 #define LCD_DATA3 3 #define LCD_CTRL_PORT PORTD #define LCD_CTRL_DDR DDRD #define LCD_RS
Mikrocontroller und Digitale Elektronik
· Simon T.
· 15.01.2021 22:34
· 3 Antworten
PORTC |= 1<<2 //PORTB |= 1; //#define OVERRIDE_BUZZERPIN_OFF PORTC &= ~(1<<2); //PORTB &= ~1; /*************************************************************************************************/ /********
in
„Problem mit meinem Projekt (Quadrocopter)“
·
Mikrocontroller und Digitale Elektronik
·
21.07.2014 15:36
Thread
Hauptprogramm int main(void) { //Einmalig abgearbeite Kommandos DDRC |= (1<<PB1); //Definiert PortC Pin 5 als Ausgang DDRB &= ~(1<<PB0); //Definiert PortB Pin 0 als Eingang uart_init(); //UART-Initialisierung aufrufen //Lokale Variablen uint8_t Flanke = 0; char y;
Mikrocontroller und Digitale Elektronik
· Treter_Peter
· 18.07.2014 21:20
· 4 Antworten
Thread
include <avr/io.h> #include <util/delay.h> int main(void) { DDRC = 0xFF; while(1) { PORTC = 0xFF; PORTC = 0x00; } }[/c] Gruß
Mikrocontroller und Digitale Elektronik
· Christian S.
· 17.07.2014 19:02
· 1 Antworten
Thread
; // use A2 instead of d8[/color] [color=#7E7E7E]//#define OVERRIDE_BUZZERPIN_ON PORTC |= 1<<2 //PORTB |= 1;[/color] [color=#7E7E7E]//#define OVERRIDE_BUZZERPIN_OFF PORTC &= ~(1<<2); //PORTB &= ~1;[/color] [color=#7E7E7E]/*******************************************
#7E7E7E]//#define LANDING_LIGHTS_DDR DDRC[/color] [color=#7E7E7E]//#define LANDING_LIGHTS_PORT PORTC [/color] [color=#7E7E7E]//#define LANDING_LIGHTS_BIT PORTC 0[/color] [color=#7E7E7E]//#define LANDING_LIGHTS_INVERT[/color] [color=#7E7E7E]/* altitude above ground (in cm) as reported
Mikrocontroller und Digitale Elektronik
· Hermann Sproesser
· 23.07.2014 17:26
· 25 Antworten
Thread
..... 'I2C Config Sda = Portc .1 Config Scl = Portc .0 Dim Busaddress As Byte Dim Busaddress_read As Byte Dim Chipaddress As Byte ..... '------------------------------------------------------------------------------ Scanbus:
Mikrocontroller und Digitale Elektronik
· Peter Hess
· 18.07.2014 14:15
· 16 Antworten
Thread
RCLOCK_PORT PORTC #define RCLOCK_DDR DDRC /////// #define RCLOCK_high() (RCLOCK_PORT |= _BV(RCLOCK_PIN)) #define RCLOCK_low() (RCLOCK_PORT &= ~_BV(RCLOCK_PIN)) //////////////// #define CLOCK_PIN
RCLOCK_PORT PORTC #define RCLOCK_DDR DDRC /////// #define RCLOCK_high() (RCLOCK_PORT |= _BV(RCLOCK_PIN)) #define RCLOCK_low() (RCLOCK_PORT &= ~_BV(RCLOCK_PIN)) //////////////// #define CLOCK_PIN
Mikrocontroller und Digitale Elektronik
· Martin Kathke
· 19.07.2014 17:45
· 10 Antworten
// STROBE -(Channel Selection) #define RESET_pin PC1 // RESET -(Resets Multiplexor) #define PORTx PORTC #define DDRx DDRC void msgeq7_init(void){ DDRx |= _BV(RESET_pin)|_BV(STROBE_pin); DDRx &= ~_BV(analog_pin); //eingang für OUT PORTx &= ~(_BV(RESET_pin)|_BV(analog_pin)); PORTx |= _BV(STROBE_pin); ADMUX
in
„7x7 rgb led matrix mit PWM und soundsteuerung code fehlerhaft?“
·
Mikrocontroller und Digitale Elektronik
·
15.07.2014 13:36
once to initialize the I2C bus. No parameters ;* are required. ;* ;* RETURN ;* None ;* ;* NOTE ;* PORTC and DDRC pins not used by the I2C bus interface will be ;* set to Hi-Z (!). ;* ;* COMMENT ;* This function can be combined with other PORTC initializations. ;* ;************************************
in
„ADC will nicht so wie er soll“
·
Mikrocontroller und Digitale Elektronik
·
14.07.2014 16:01
1,1,1 ,1 ,254, 254, 254,254,254 ,254, 254, 254 ,254, 254 ,254, 254,254,254}; uint8_t i; PORTB=0xFF; PORTC =0xF7; PORTD=0xFF; //pullups aktiv DDRC=0x0F; //PC0-PC3 auf ausgang DDRB=1; shift_32_out(0xFFFFFFFF); PORTC &= ~(1<<PC2); //ausgang an shift register aktiv // Timer 1 OCRA1, als variablen Timer nutzen
in
„7x7 rgb led matrix mit schieberegistern“
·
Mikrocontroller und Digitale Elektronik
·
13.07.2014 15:43
** //SHIFT_REGISTER_PORT_DEFINITIONEN //************************************** #define SHIFT_PORT PORTC #define SHIFT_SI PC0 //Serial Data Input #define SHIFT_RCK PC3 //Storage Register ClockInput #define SHIFT_SCK PC1 //Shift Register ClockInput //****************************************************
in
„7x7 rgb led matrix mit schieberegistern“
·
Mikrocontroller und Digitale Elektronik
·
13.07.2014 15:43
Thread
{ adcval = ADC_Read_Avg(0,5); if(adcval < 140) // Kleiner 684mV { PORTC |= (1<<PC0); PORTC &= ~(1<<PC1); PORTC &= ~(1<<PC2); } if((adcval > 140) && (adcval < 800)) // zwischen 684mV und 3,9V { PORTC |= (1<<PC1); PORTC &= ~(1<<PC0); PORTC &= ~(1<<PC2); } if(adcval > 800) // Größer 3,9V { PORTC |= (1<<PC2); PORTC &= ~(1<<PC0); PORTC &= ~(1<<PC1); }
Mikrocontroller und Digitale Elektronik
· Rene
· 10.07.2014 19:21
· 17 Antworten
Thread
); while(1) { uint8_t i = 0; //um zu sehen, ob etwas passiert i = PORTC ; i++; PORTC = i; } } void init(void) { TCCR0 = (1<<WGM00) | (1<<WGM01) | (1<<COM00) | (1<<COM01) | (1<<CS01); //Timer0 init auf FastPWM Inverting Mode, Prescaler
Mikrocontroller und Digitale Elektronik
· J. T.
· 10.07.2014 13:50
· 11 Antworten
Thread
Fuses liegen? Die Jumper an PORTD sind nicht gesetzt. Anfangs hatte ich das alles auch schon auf PORTC verdrahtet (und natürlich die headerdatei lcd-routines.h bezüglich der PORTs umgeschrieben), allerdings hatte ich dort das gleiche Problem. Mit Verwendung des PORTD´s habe ich die lcd-routines wieder
Mikrocontroller und Digitale Elektronik
· Eeeeee
· 31.07.2014 16:55
· 29 Antworten
Thread
aufeinanderfolgenden Pins liegen // LCD DB4-DB7 <--> PORTD Bit PD0-PD3 #define LCD_PORT PORTC #define LCD_DDR DDRC #define LCD_DB PC4 // LCD RS <--> PORTD Bit PD4 (RS: 1=Data, 0=Command) #define LCD_RS PC2 // LCD EN <--> PORTD Bit PD5 (EN:
Mikrocontroller und Digitale Elektronik
· Sören T.
· 08.07.2014 22:19
· 2 Antworten
Thread
(void) { DDRA=0; DDRB=0; DDRC=0xF0; DDRD=0; PORTA=0; PORTB=0; PORTC =0xF0; PORTD=0; while(1){ } return 1; }[/c]
tust du das > DDRC=0xF0; schaltet (unter anderem) die Pins PC2 und PC3 auf Input. > PORTC =0xF0; Es wird auch kein Pullup für diese Pins aktiviert. -> Deine Pins PC2 und PC3 sind einfache Eingänge, denen µC seitig kein Pegel aufgezwungen wird. Es ist ein Irrtum, dass ein Input-Pin
Mikrocontroller und Digitale Elektronik
· Micha Arl
· 09.07.2014 10:13
· 4 Antworten
Thread
Command Port #define LCD_DATA_PIN PINC // Data Input Register #define LCD_DATA_PORT PORTC // Data Output Register #define LCD_DATA_DDR DDRC // Data Direction Register for Data Port // Command Port Bits #define CD 0x07 // Data/Control (RS) PinNumber #define
Mikrocontroller und Digitale Elektronik
· tom
· 08.07.2014 15:44
· 5 Antworten
Thread
(0<<DDC2) | (0<<DDC1) | (0<<DDC0); // State: Bit6=T Bit5=T Bit4=T Bit3=T Bit2=T Bit1=T Bit0=T PORTC =(0<<PORTC 6) | (0<<PORTC 5) | (0<<PORTC 4) | (0<<PORTC 3) | (0<<PORTC 2) | (0<<PORTC 1) | (0<<PORTC 0); // Port D initialization // Function: Bit7=In Bit6=In Bit5=In Bit4=In Bit3=In Bit2=In Bit1=In Bit0
Mikrocontroller und Digitale Elektronik
· Klaus
· 08.07.2014 11:21
· 7 Antworten
Thread
Motor dreht. Hättet ihr eine Idee an was die liegen kann. Ich habe beim PWM sowohl direkt oder via PORTC versucht -> gleiches Ergebnis. Vielen Dank schon mal für eure Ideen! Beste Grüße,
Mikrocontroller und Digitale Elektronik
· clean-energy
· 08.07.2014 10:56
· 11 Antworten
and BOR/Value at all other Resets ‘1’ = Bit is set ‘0’ = Bit is cleared (1, 2) bit 7-0 RC<7:0> : PORTC General Purpose I/O Pin bits 1 = Port pin is IHV 0 = Port pin is ILV Note 1: Writes to PORTC are actually written to corresponding LATC register. Reads from PORTC register is return of actual I/O pin
in
„PIC16(L)F1703 low voltage Programmierung?“
·
Mikrocontroller und Digitale Elektronik
·
04.07.2014 10:46
0xff; // Ausgänge auf 0, Wegen Input anpassen? PORT = Pulldown bei Input? PORTA=0x00; PORTB=0x00; PORTC =0x00; PORTD=0x00; // Initalisierung von Time --> Set für Multiplex time(); while(1) { // Stunden einstellen gezählt, 2 IFs um zu entprellen, // // time am Ende um die 2 stelligen Stunden sofort zu
in
„Atmega16 PortD“
·
Mikrocontroller und Digitale Elektronik
·
01.07.2014 22:02
Thread
Matrix von den PINAs getrieben werden heller sind als die welche von PINDs getrieben werden. An PORTC und PORTB hängen die MosFets.
unter dem Controller zu VCC geht ist nicht in Ordnung. Wie hoch sind die Spannungen an PORTB, PORTC ?
Mikrocontroller und Digitale Elektronik
· Martin B.
· 02.07.2014 16:28
· 41 Antworten
Thread
Datenbus DB4-DB7, das unterste Bit DB4 kann auf den Portbits 0..4 liegen // LCD DB4-DB7 <--> PORTC Bit PC0-PC3 #define LCD_DB PD0 // LCD Steuersignale RS und EN // LCD RS <--> PORTC Bit PC4 (RS: 0=Data, 1=Command) #define LCD_RS PD4 // LCD EN <--> PORTC
Mikrocontroller und Digitale Elektronik
· DerNeue
· 01.07.2014 22:47
· 21 Antworten
Portd.3 = 1 Portd.4 = 1 ' I²C-Leitungen Config Pinc.4 = Output Config Pinc.5 = Output Config Scl = Portc .5 Config Sda = Portc .4 '**************************************************************** ' Initialisierung '**************************************************************** ' Konstanten für TSA5055
in
„2,4 oder 2,5 Ghz Synthesizer IC“
·
HF, Funk und Felder
·
28.06.2014 16:28
Thread
Wandlung nicht übernommen. */ (void) ADCW; while(1) { //Phase ausgeben PORTC = 0x00; PORTC = getADCmax(3); _delay_ms(7); PORTB = 0x08; for(i = 0; i < 200; i++) _delay_ms(1); //Strom ausgeben PORTC = 0x00; PORTC = getADCmax(2);
PORTB = 0x04; for(i = 0; i < 200; i++) _delay_ms(1); //Spannung Ausgeben PORTC = 0x00; PORTC = getADCmax(1); _delay_ms(7); PORTB = 0x00; for(i = 0; i < 200; i++) _delay_ms(1); } } [/c] Kann mir da jemand weiterhelfen? Grüße
Mikrocontroller und Digitale Elektronik
· Johannes
· 26.06.2014 20:14
· 4 Antworten
Thread
.... [/c] bei unveränderter Einstellung ja auch auf den PORTD gelegt werden. Die sind aber am PORTC . Also musst du das auch eintragen [c] .... #define LCD_RS_PORT PORTC /**< port for RS line */ #define LCD_RS_PIN 0 /**< pin for RS line */ #define LCD_RW_PORT PORTC /**< port for RW line */ #define LCD_RW_PIN 1 /**< pin for RW line */ #define LCD_E_PORT PORTC /**< port for Enable line */ #define LCD_E_PIN
Mikrocontroller und Digitale Elektronik
· Arne Pfäffle
· 07.07.2014 10:43
· 10 Antworten
LCD Datenbus DB4-DB7, das unterste Bit DB4 kann auf den Portbits 0..4 liegen // LCD DB4-DB7 <--> PORTC Bit PC0-PC3 #define LCD_DB PD4 // LCD Steuersignale RS und EN // LCD RS <--> PORTC Bit PC4 (RS: 0=Data, 1=Command) #define LCD_RS PC0 // LCD EN <--> PORTC Bit PC5 (EN: 1-Impuls für Daten) #define LCD_EN
in
„Problem mit ATmega164A und LCD FDCC1601E“
·
Mikrocontroller und Digitale Elektronik
·
26.06.2014 15:50
|= (1<<LCD_RS) | // R/S Leitung (1<<LCD_EN); // initial alle Ausgänge auf Null LCD_PORT &= ~pins; PORTC &= ~(1<<LCD_RS); PORTC &= ~(1<<LCD_EN); // warten auf die Bereitschaft des LCD _delay_ms( LCD_BOOTUP_MS ); LCD_PORT = 0b00100000; _delay_ms( LCD_BOOTUP_MS ); LCD_PORT = 0x00; // Soft-Reset muss 3mal
in
„Problem mit ATmega164A und LCD FDCC1601E“
·
Mikrocontroller und Digitale Elektronik
·
26.06.2014 15:50
diode_PortA_C (int8_t portOut, int8_t pinOut) { bool temp = false; DDRA |= (1<<portOut); DDRC &= ~(1<<PC7); PORTC &= ~(1<<PC7); PORTA |= (1<<portOut); if (PINA & (1<<pinOut)) { if (PINC & (1<<PINC7)) { temp = true; PORTA &= ~(1<<portOut); } } else { temp = false; } return temp; } bool diode_PortC_A (int8_t pinIn) { bool temp = false; DDRA = 0x00; DDRC |= (1<<PC7); PORTC |= (1<<PC7); PORTC |= (1<<PC7); if (PINC & (1<<PINC7)) { if (PINA & (1<<pinIn)) { temp = true; PORTC &= ~(1<<PC7); } } else { temp = false; } return temp; } void ergebnis (bool b1, bool b2, bool b3
in
„Problem mit ATmega164A und LCD FDCC1601E“
·
Mikrocontroller und Digitale Elektronik
·
26.06.2014 15:50
are not used by PORTB. 2011 Microchip Technology Inc. DS39932D-page 141 PIC18F46J11 FAMILY 10.4 PORTC , TRISC and LATC Note: On a Power-on Reset, PORTC pins Registers (except RC2) are configured as digital PORTC is an 8-bit wide, bidirectional port. The corre- inputs. RC2 will default as an analog input
in
„PIC18F46J11 und RTC. Quarz nötig? Anfängerfrage Übersicht verloren ;-(“
·
Mikrocontroller und Digitale Elektronik
·
24.06.2014 15:08
Thread
Da ich für Inputs (Taster) nur PROTC nutze, wird auch nur dieser von mir konfiguriert. .equ PORTC _DDRC = 0b00001001 ; DDRC (Richtungsregister, 1=Output, 0=Input) .equ PORTC _PORTC = 0b00000000 ; Alle Bits an PORTC 0 ausschalten ldi Tmp, PORTC _DDRC ; DDRC (Richtungsregister) setzen out DDRC, Tmp ldi Tmp, PORTC _PORTC ; Bits und Pullup-Widerstände setzen out PORTC , Tmp @Alle anderen: Hmm, nun wenn das Abschalten des TX nicht Usus ist, dann ist das ja in Ordnung. Ich kenne den genauen
Mikrocontroller und Digitale Elektronik
· Markus
· 22.06.2014 22:45
· 24 Antworten
0xF0; DDRD=0xFF; //***** PORTS definieren ENDE ***** //***** PORTS Nullen ***** PORTA=0; PORTB=0; PORTC =0; PORTD=0; //***** PORTS Nullen ENDE ***** //***** Alle Startzustände definieren ***** PORTB|=(1<<PB0); //vers einschalten verszaehler=0; //verszaehler nullen PORTB&=~(1<<PB1); //58OUT ausschalten
in
„Steuerung für Klappscheinwerfer“
·
Mikrocontroller und Digitale Elektronik
·
22.06.2014 15:25
empf > 63) { PORTB |= (1<<PB4); empf = (empf -64); } else { PORTB &= ~(1<<PB4); } if (empf > 31) { PORTC |= (1<<PC5); empf = (empf -32); } else { PORTC &= ~(1<<PC5); } if (empf > 15) { PORTC |= (1<<PC4); empf = (empf -16); } else { PORTC &= ~(1<<PC4); } if (empf > 7) { PORTC |= (1<<PC3); empf = (empf -8); } else { PORTC &= ~(1<<PC3); } if (empf > 3) { PORTC |= (1<<PC2); empf = (empf -4); } else { PORTC &= ~(1<<PC2); } if (empf > 1) { PORTC |= (1<<PC1); empf = (empf -2); } else { PORTC &= ~(1<<PC1); } if (empf > 0)
in
„Anfänger - Übertragung von 1 bis 255 von PC und Atmega8“
·
Mikrocontroller und Digitale Elektronik
·
22.06.2014 11:23
Thread
Display an PORTC angeschlossen? Dann JTAG deaktivieren.
Mikrocontroller und Digitale Elektronik
· Helmut
· 22.06.2014 18:03
· 21 Antworten
Thread
if(a==0){a=1;} else{a=0;} TCNT1=0; } ISR(TIMER1_OVF_vect){ // eigentlich irrelevant PORTC ++; } [/c] Vielen Dank schonmal im voraus!
Mikrocontroller und Digitale Elektronik
· Blubber
· 21.06.2014 16:16
· 5 Antworten
********** ende serial port ********************** Config Portb = Output Daten Alias Portb Config Portc .0 = Output W1 Alias Portc .0 W1 = 1 Config Portc .1 = Output W2 Alias Portc .1 W2 = 1 Config Portd.6 = Output Config Portd.7 = Output Dim Bcount As Word Dim Tempword As Word Dim Phase As Byte Dim Freq
in
„ATMega644 Sinusgenerator“
·
Mikrocontroller und Digitale Elektronik
·
19.06.2014 21:51
Lichtschranke PD2 auf Eingang DDRD = DDRD & ~(1<<PD2); // LEDs auf den Ports ausschalten PORTB = 0xff; PORTC = 0xff; PORTD = 0xff; EIMSK |= _BV(INT0); // PD2 = INT0 enablen EICRA |= _BV(ISC01); // Triggern auf fallende Flanke des INT0 //Timer1 fuer die Umlaeufe konfigurieren TCCR1B = (1 << CS10) | (1 << CS21
in
„Probleme mit dem isr(int0_vect)“
·
Mikrocontroller und Digitale Elektronik
·
18.06.2014 17:16
heater; // Heater is OUTPUT PORTD &= ~(heater); // Heater is OFF DDRC &= ~(sensor); // Sensor is INPUT PORTC &= ~(sensor); // Disable PullUp DDRD |= RED | GREEN | BLUE; // RGB LED is OUTPUT // ADC setup ADCSRA |= ((1<<ADPS2)|(1<<ADPS1)|(1<<ADPS0)); //Prescaler at 128 -> 125Khz ADC clock source // ADMUX |=
in
„(Airwick) AS-MLV-P VOC-Sensor: Wie ansteuern?“
·
Analoge Elektronik und Schaltungstechnik
·
18.06.2014 08:28
Thread
PORTC &= 255-_BV(0); Das müsste ja die kurzfassung von PORTC = PORTC & 255-_BV(1); sein oder? was wiederum Bitmanipulation sein müsste?! Doch was genau tut diese? und wie kommt es dazu das dadurch mit
für was steht? Frage 3: Ist PORTC &= 255-_BV(0); die kurzfassung von PORTC = PORTC & 255-_BV(1); Frage 3.1: Was macht diese Bitmanipulation? Und wie kommt es dazu das dadurch der pin auf 0 gesetzt wird? Frage 3.2: Ist PORTC
Mikrocontroller und Digitale Elektronik
· Martin Kathke
· 25.06.2014 12:14
· 28 Antworten
read DDRB=0b11; PORTB=PORTB | 0b11; //Da beide Signale invertiert, müssen sie per default an sein PORTC =PORTC | (0b11<<5); //Chip select ist ebenfalls invertiert TWCR=0b100 | (1<<6); //TWI Enable TWBR=72; //100kHz bei CPU @ 16MHz TWAR=20; //Slave adress: 20 DDRD=0; //Lo-Byte Datenleitung DDRA=0; //High-Byte Datenleitung PORTD=255; PORTA=255; PORTC =PORTC | (1<<7); //Reset abschalten => Laufwerke hochfahren PORTC = (PORTC & clr_bit) | stat_command; //Alternate status register anwählen while(1){ PORTB=PORTB & ~0b10; //read __asm volatile("NOP");
in
„ATA Floppy mit ATmega1284P ansteuern“
·
Mikrocontroller und Digitale Elektronik
·
15.06.2014 19:21
Thread
Hallo, was soll das ... [c] PORTC = (PORTC & clr_bit) | stat_command; [/c] machen - keine Definition zu finden. Musst du evl. eine bestimmete Länge für den Resetzyklus einhalten?! Sascha
~0b1111100 Damit ist clr_bit= 0b0000011 auf 8Bit erweitert also 0b00000011 ! Beim verunden mit PortC wird PC7, alias Reset, wieder Low und damit aktiv. Sascha
Mikrocontroller und Digitale Elektronik
· Hugo83
· 23.06.2014 18:45
· 16 Antworten
read DDRB=0b11; PORTB=PORTB | 0b11; //Da beide Signale invertiert, müssen sie per default an sein PORTC =PORTC | (0b11<<5); //Chip select ist ebenfalls invertiert TWCR=0b100 | (1<<6); //TWI Enable TWBR=72; //100kHz bei CPU @ 16MHz TWAR=20; //Slave adress: 20 DDRD=0; //Lo-Byte Datenleitung DDRA=0; //High-Byte Datenleitung PORTD=255; PORTA=255; PORTC =PORTC | (1<<7); //Reset abschalten => Laufwerke hochfahren PORTC = (PORTC & clr_bit) | stat_command; //Alternate status register anwählen while(1){ PORTB=PORTB & ~0b10; //read __asm volatile("NOP");
in
„ATA Floppy mit ATmega1284P ansteuern“
·
Mikrocontroller und Digitale Elektronik
·
15.06.2014 16:10
Thread
main(void){ DDRB = 0xff; DDRD = 0x00; DDRA = 0x00; DDRC = (1<<PC0) | (1<<PC1); PORTC = (1<<PC0) | (1<<PC1); while(1) { i2c_init(); i2c_start(0b01000000); i2c_write(0xFF); i2c_stop(); _delay_ms(1000); i2c_init
When this pin is used by the Two-wire Serial Interface, the pull-up can still be controlled by the PORTC 1 bit. MfG Spess
Mikrocontroller und Digitale Elektronik
· Jakob
· 12.06.2014 15:40
· 26 Antworten
Thread
BV(ISC01); // Triggern auf fallende Flanke des INT0 PORTD |= _BV(PD2); while( 1 ) { PORTC |= _BV( PC0 ); _delay_ms( 1000 ); } } ISR (INT0_vect) { PORTC &= ~ _BV( PC0 ); } [/c] ... auch ausreichend ist, um die Funktion des externen Interrupts für sich alleine zu testen
; // Triggern auf fallende Flanke des INT0 > PORTD |= _BV(PD2); > > while( 1 ) { > PORTC |= _BV( PC0 ); > _delay_ms( 1000 ); > } > } > > ISR (INT0_vect) > { > PORTC &= ~ _BV( PC0 ); > } Was machen Sie da im Interrupt ? Weil bei mir 2 Led´s aufleuchten.
Mikrocontroller und Digitale Elektronik
· Tuji de Assis Moreira
· 18.06.2014 19:11
· 27 Antworten
Thread
// Ausgangspin für Aufnahmegerät DDRD = 0x00; // Eingang für Sensoren PORTC |= (1<<PC0); // Setze Aufnahme auf HIGH (Low-Aktiv) PORTD |= (1<<PD2); // Setze internen Pull-Up GICR |= (1<<INT0) | (1<<INT1); MCUCR |= (1<<ISC00) | (1<<ISC10); }
("Einsatzbereit"); display_memory_address = 43; pal_write("Ruhe "); PORTC |= (1<<PC0); // Aufnahmepin HIGH (Low-Aktiv!!!) } uart_vt100("[1;1f"); uart_vt100("[?25l"); // [UART] Cursor unsichtbar schalten uart_vt100("[33m");
Mikrocontroller und Digitale Elektronik
· Timm S.
· 10.06.2014 13:14
· 19 Antworten
Thread
include <avr/interrupt.h> #include <util/delay.h> #include "defs.h" #define LCD_D4 SBIT( PORTC , 4 ) #define LCD_DDR_D4 SBIT( DDRC, 4 ) #define LCD_D5 SBIT( PORTC , 5 ) #define LCD_DDR_D5 SBIT( DDRC, 5 ) #define LCD_D6 SBIT( PORTC , 6 ) #define LCD_DDR_D6 SBIT( DDRC, 6 )
PORTD ^= ( 1 << LED4 ); _delay_ms(100); } } ISR (TIMER1_COMPA_vect) { PORTC ^= ( 1 << TRIGGER ); } [/c] Hat jemand nen Tipp für mich? VG Willy
Mikrocontroller und Digitale Elektronik
· Willy
· 09.06.2014 20:26
· 16 Antworten
Thread
beginnen. Du solltest AVCC einen Abblockkondensator spendieren und mit VCC verbinden. Sonst wird dein PortC nicht funktionieren. p.s. Das Zeichnen von Brücken in Schaltplänen ist unüblich. Statt dessen werden bei 3er- und 4er-Verbindungen Punkte gesetzt.
Mikrocontroller und Digitale Elektronik
· Dennis Günther
· 09.06.2014 19:15
· 10 Antworten
DS18B20 MSB .equ DQ = 7 ;Datenleitung des Ds18B20 .equ DS_DDR = DDRC ;Port des DS18B20 .equ DS_Port = PortC .equ DS_Pin = PinC .equ LCD = PortB ;LCD-Datenport .equ LCDDDR = DDRB .equ LCMD = PortA ;LCD-kommandoport .equ LCMDDR = DDRA .equ EN = 1 ;Enable-Leitung .equ RS = 0 ;Kommando / Daten Leitung .equ XTAL
in
„Elektroniker Stammtisch Nähe München“
·
Offtopic
·
08.06.2014 20:39