avr-gcc-list
[Top][All Lists]
Advanced

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

[avr-gcc-list] efficiency of assigning bits


From: Jamie Morken
Subject: [avr-gcc-list] efficiency of assigning bits
Date: Sun, 13 Mar 2005 06:42:43 -0800

Hi,

I am trying to turn two bits off on a port as
quickly as possible, how do these two methods
compare:

PORTD = (PORTD & ~PD1) & ~PD4;

or:

cbi(PORTD, PD1); 
cbi(PORTD, PD4);

I am assuming these are equivalent.  I am learning
about bit operators so I can't be sure yet! :)

cheers,
Jamie






reply via email to

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