I have a Attiny84A at hand which I run at 1MHZ / 5V.
I experience a malfunction of the BREQ instruction.
Here's my code:
start: SBI DDRB,2 ; DDRB |= 1 << 2; Set pin as output (a LED is connected) CBI PORTB,2 ; PORTB &= ~(1 << 2) Clear Pin comp: SEZ ; Set Zero Flag BREQ comp ; Jump if zero flag set SBI PORTB,2 ; LINE SHOUDLD NEVER BE REACHED. PORTB |= 1 << 2 Set Pin On RJMP comp
When I power cycle the MCU a few times at some point the Pin wil be turned to High, altough it never should!
Do you have any idea what could be the issue here?
Or did you experience something similar?
Thanks in advance.
EDIT: Replaced IO register Numbers with PORTB/DDRB constants