Microcontroller › AVR › what is bit masking????? › hello..A bit mask is a
June 10, 2013 at 8:33 am
#9931
Participant
hello..
A bit mask is a variable used with logical operators.
Assuming you want to read the 5th pin of Portb (actually any port)
variable=PINB&(1<<PB5) // where pb5 refers to the 5th pin…PINB is used to read the values of a port
This is your mask.. it stores the value at the 5th pin into the variable