Gast
#363677
Guten Abend, ich hexe schon eine Weile herum mit meinem ATMEGA162. Der gibt auf Port D im Gegensatz zu den anderen nix raus. Mein Programm fängt so an: int main(void) { //Fuse CKDIV8 und JTAGEN aus!! MCUCR |= (1<<ISC01); //INT0 falling slope GICR |= (1<<INT0); //INT0 allowed TIMSK &= ~((1<<OCIE2)|(1<<TOIE2)); /* Write new values to TCNT2, OCR2, and TCCR2. */ TCNT2 = preload; TCCR2 |= ((1<<CS20)|(1<<CS21)|(1<<CS22)); //1024 Vorteilung TIFR |= ((1<<OCF2)|(1<<TOV2)); TIMSK|= (1<<TOIE2);//Timer 2 Overflow Interrupt ein. DDRA = 0xFF; DDRB = 0xFF; DDRC = 0xFF; DDRD = 0xFB; //All Ports OUTPUTS except INT0 (Pin12) PORTD |= ( 1 << PB2 ); //Pullup-resistor on INT0 sei(); //Enable all interrupts while(1) { } return (1); } Im Timer Interrupt gebe ich auf meinen Ports A-D alle 30ms Werte aus, aber Port D schweigt immer. WARUM?? JTAG Fuse ist aus. Ich werde aus den möglichen Sonderfunktionen von Port D (Seite 77 ATMEL Doku) nicht schlau und will die auch gar nicht. Was ist da eingeschaltet was ich gar nicht will?? Danke für eine kurze Hilfestellung. Thomas