I have been looking for a way to read some pins (3 in this case) that would create an address for the program I have and is working very well.
I found this in the forum and it works great but puzzled why I can't find it in the language reference under the learning drop down box.
dipSwitch = PIND & 0b00011100; // read PORTD, mask off for bits 4, 3, 2
The command/function(?) "PIND" reads the port D pins and that is anded with a binary value to mask all the bits except 2, 3 and 4 but I can't find this useful function/command( sorry confused as to what it may be called) in the language reference. I wonder if the reverse could be used, outputting a byte or any number of bits at same time? So where can I find a definition and all the quirkiness for this plus what others are missing/not listed that could be of use? Thanks Bruce