Tonight I began trying to use PORT instructions on my Micro. I set D0-D7 as OUTPUT. Then I tried the following. PORTD = B11111111 It sets all of the D0-D7 EXCEPT D5. D5 remained low. digitalWrite(5,HIGH) works just fine though.
"Digital Pin 5" is NOT connected to port PD5. PD5 is the yellow TX led. The other digital pins are probably not connected where you expect them, either. See the schematic. Arduinos in general are not set up to make port IO "easy."
Hi Don, Thanks for posting. I figured how to do what I wanted with PORTD. I'm putting together a POV display and using the micro for brains. Luckily for me I was only planning on using a 5 x 7 character font. I used D0,1,2,3,4,6,7. I grabbed an example program from somewhere here online but the character deinitions were off. They must have been for a board with all of PORTD available. I rewrote the defs for my needs by shifting bit 5 and 6 up to positions 6 and 7 and not wanting to flash the Tx led I made that bit = 0 all the time. I will probably still have to edit a little once I get this going. Alan