Arduino Micro PORTD problem.

Post here about your Arduino projects, get help - for Adafruit customers!

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
aramsdell
 
Posts: 4
Joined: Sun Jan 27, 2013 9:50 pm

Arduino Micro PORTD problem.

Post by aramsdell »

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 :?:

User avatar
westfw
 
Posts: 2008
Joined: Fri Apr 27, 2007 1:01 pm

Re: Arduino Micro PORTD problem.

Post by westfw »

"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."

aramsdell
 
Posts: 4
Joined: Sun Jan 27, 2013 9:50 pm

Re: Arduino Micro PORTD problem.

Post by aramsdell »

I jsut found this. http://arduino.cc/en/uploads/Main/ardui ... ematic.pdf

Does this mean Port D bit 5 is not available?

User avatar
westfw
 
Posts: 2008
Joined: Fri Apr 27, 2007 1:01 pm

Re: Arduino Micro PORTD problem.

Post by westfw »

Correct. Port D bit 5 is not available.
This is apparently exactly compatible with Leonardo, btw.

aramsdell
 
Posts: 4
Joined: Sun Jan 27, 2013 9:50 pm

Re: Arduino Micro PORTD problem.

Post by aramsdell »

Thank you for your help.
Alan

User avatar
floresta
 
Posts: 223
Joined: Thu Jul 31, 2008 10:27 am

Re: Arduino Micro PORTD problem.

Post by floresta »

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 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.

Don

aramsdell
 
Posts: 4
Joined: Sun Jan 27, 2013 9:50 pm

Re: Arduino Micro PORTD problem.

Post by aramsdell »

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

Locked
Please be positive and constructive with your questions and comments.

Return to “Arduino”