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.
DID I GET A DUD?
Is there a firmware prob?
Alan
Arduino Micro PORTD problem.
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
- westfw
- Posts: 2008
- Joined: Fri Apr 27, 2007 1:01 pm
Re: Arduino Micro PORTD problem.
"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."
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."
-
- Posts: 4
- Joined: Sun Jan 27, 2013 9:50 pm
Re: Arduino Micro PORTD problem.
I jsut found this. http://arduino.cc/en/uploads/Main/ardui ... ematic.pdf
Does this mean Port D bit 5 is not available?
Does this mean Port D bit 5 is not available?
- westfw
- Posts: 2008
- Joined: Fri Apr 27, 2007 1:01 pm
Re: Arduino Micro PORTD problem.
Correct. Port D bit 5 is not available.
This is apparently exactly compatible with Leonardo, btw.
This is apparently exactly compatible with Leonardo, btw.
-
- Posts: 4
- Joined: Sun Jan 27, 2013 9:50 pm
Re: Arduino Micro PORTD problem.
Thank you for your help.
Alan
Alan
- floresta
- Posts: 223
- Joined: Thu Jul 31, 2008 10:27 am
Re: Arduino Micro PORTD problem.
The DC Boarduino is an exception, the eight bits of Port D are conveniently lined up along with a pair of power pins right next door. The pins for the other ports are grouped together as well.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."
Don
-
- Posts: 4
- Joined: Sun Jan 27, 2013 9:50 pm
Re: Arduino Micro PORTD problem.
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
Alan
Please be positive and constructive with your questions and comments.