direct access of PORTD?

DDRD will not work because that is for defining whether each pin is input/output.

Right, I was just trying to read something that was non-zero for a sanity check. I can read DDRD to see what the direction bits are set to, right?

PORTD does not work because that is for reading/writing the current output state (HIGH/LOW).

I'll buy that, but I'm sure I've seen examples that say "PORTD ^= PORTD;" or something along those lines. Of course, the example (or my memory) could be faulty. :slight_smile:

What you want is: PIND, which is the array of input state bits.

That's the ticket!

thanks.

-j