Code: [Select]PINB = PINB | _BV (5);What if input zero is already high? We end up with this... :...which toggles two pins!
PINB = PINB | _BV (5);
PORTB |= _BV(5);
#define ALT_PINB (*((uint8_t volatile *)0x23))... ALT_PINB = ALT_PINB | _BV(5);
I've been searching my history for where I got that " PINB |= _BV (5) is better than PINB = _BV (5) " technique from.
PINB |= _BV (5);
Please enter a valid email to subscribe
We need to confirm your email address.
To complete the subscription, please click the link in the
email we just sent you.
Thank you for subscribing!
via Egeo 16