Write instructions to toggle bits bit3 nd bit4 of PORTCSolut

Write instructions to toggle bits bit3 nd bit4 of PORTC.

Solution

Hi,If by \"toggle\" you actually mean \"set pin to 1\" and \"set pin to 0\" then you can toggle bits by using the following:


PORTC |= _BV(PDx);

PORTC &= ~_BV(PDx); where x is the pin number.

This has worked for me. Hope this will be helpful.

Write instructions to toggle bits bit3 nd bit4 of PORTC.SolutionHi,If by \

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site