Zitat Zitat von ATmega8
Some of the Status Flags are cleared by writing a logical one to them. Note that the CBI and SBI instructions will operate on all bits in the I/O Register, writing a one back into any flag read as set, thus clearing the flag. The CBI and SBI instructions work with registers 0x00 to 0x1F only.
CBI und SBI sind read-modify-write Befehle. D.h. sie Lesen das SFR, fummeln das Bit rein und schreiben es wieder. SBI sollte also ebenfalls *alle* Flags löschen. Getestet hab ich es allerding nicht. Ich verwende TIFR/GIFR = Und muss mir keine Gedanken drum machen. Auch nicht darum, ab die auf einem anderen Derivat bitadressierbar sind oder nicht.

AVR ist eine 8-Bit Architektur mit 8-Bit Anbindung der Peripherie (SFRs). Ein SBI/CBI muss sich dieses 8-Bit Bus' bedienen. Es gibt keinen 1-Bit-Bus zum bitadressierbaren SFR-Bereich.