Hi, I am wondering what happens here, like if code would run in the background :-) If I run this code (initialisation part being removed to clarify), PortB.2 remains low: Timer0Overflow: reti Reset: ... sei cbi PORTB, 2 Main: rjmp Main And if I run following, PortB.2 goes low but immediatly after, et goes high again (seen on my scope): Timer0Overflow: cbi PORTB, 2 reti Reset: ... sei Main: rjmp Main In this second case the AVR behaves like if I would have cbi then sbi. So, who is raising my PortB.2 output? Regards
AVR, ATMega8, who is running his code on mine?
Started by ●October 3, 2004
Reply by ●October 3, 20042004-10-03
in fact, it seems it bahaves like if Reset occurs immediatly after Timer0Overflow. but I still do not know why.
Reply by ●October 3, 20042004-10-03