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