Gast
#32869
Hallo zusammen !!! Vielleicht kan jemand mir helfen. Wie kan ich richtig 16 bit T\C1 bei AT8515 initialisieren und TIM!_OVF interrupt realisieren? Ich will z.b. dass an PORT B LED 7 an geht. Schreibe folgendes,aber funktioniert nicht. Was mache ich falsch? danke im voraus Andrey Richter .org 0x000 rjmp RESET .org 0x000 rjmp TIM1_OVF RESET: .def temp =r16 .include"8515def.inc" .org 0x000 rjmp main rjmp interrupt main: ldi temp,LOW(RAMEND) out SPL,temp ldi temp,HIGH(RAMEND) out SPH,temp ldi temp,0xff out DDRB,temp out PORTB,temp ldi temp,0 out GIMSK,temp ;Gen. Interrupt Mask disable ldi temp,0 out GIFR,temp ; Gen. Interrupt Flag disable ldi temp,0b100000000 out TIMSK,temp ;T\C1 Overflow Interrupt enable ldi temp,0 out TCCR1A,temp ;T\C1 Control Reg. disable ldi temp,0b00000101 out TCCR1B,temp ; Prescaler is 1024 ldi temp,0b11111111 out TCNT1H,temp ldi temp,0 out TCNT1L,temp sei loop: rjmp loop interrupt: cbi PORTB,7 reti