All, I am trying to read the whole PORT(s) at once, not the individual pins. Where can I find this information about the ins and outs of all the ATMEGA part that is supported through the Arduino compilier? I have the data sheets on the ATMEGA, but where can I find the rest of the Arduino functions?
If you look in the datasheet you will see that ALL the AVR's registers are memory mapped - theu have an address just like any variable. The Ports (see datasheet) are registers!
You need to keep in mind that on an Uno every port has at least one pin used for some activity and not available to you to change (for examples pins 0 and 1 are used for serial comms and 2 other pins are used for the external oscillator). So you can't have 8 of your inputs (or outputs) on any single port. The Mega which has more ports does have some that are completely unused.
If you are writing direct to a port with PORTx you must be careful not to upset the pins that have other purposes.
All, thanks for the info. I just didn't realize that the compiler used reserved words that are directly addressable to the AVR registers.
I am still looking at ...\hardware\arduino\avr... to try to find more information of what nomenclature to use.... (UPPER CASE or lower case or underscore or ?????....)
I'll keep digging.
Also, yes sir Robin2, I've kept that in my mind that the pins are dual purpose!!!