avr-chat
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[avr-chat] when is loop_until_bit_is_set/clear required after setting a


From: Britton Kerin
Subject: [avr-chat] when is loop_until_bit_is_set/clear required after setting a bit?
Date: Wed, 7 Sep 2016 14:19:59 -0800

I remember reading somewhere in avr libc docs to do e.g. this:

    PCIFR = _BV (some_bit)
    loop_until_bit_is_clear (PCIFR, some_bit);

This may be a bad example becuase of the odd write-one-to-clear
semantics.  That isn't the point here, I don't remember which
registers this advice applied to.  And I can't find it now.


The only thing I could find in the datasheet that related to this was
in section 13.2.4 of ATMega328P datasheet, where it says that you
have to wait a cycle after assigning an output pin value before
reading it back in.

Are there other cases where loop_until_* or a nop is required?

Thanks,
Britton



reply via email to

[Prev in Thread] Current Thread [Next in Thread]