Pages: [1]   Go Down
Author Topic: Digital Pin bizzareness  (Read 577 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 2
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

So I'm breadboarding with a Nano 328.  I had D2 set as an input with the internal pull-up on, and was getting some erratic readings, with it returning LOW when it shouldn't.  So I probed it with a meter and found that when unconnected to anything else, the voltage from pin to ground was all over the place.  I then did the same for the rest of the digital pins.  From this, I determined that digital 2, 3, 5, 6, 8 and 9 were behaving oddly, with the remainder behaving normally.  I then tested them as outputs, where all except 8 were behaving as normal.  D8 was at a constant 2V regardless of what I was writing to it.  I then swapped the board for another and found exactly the same problem.

Is this a known behavior for the 328?  I'm especially concerned by the pin 8 thing.  These aren't official Gravitech boards, but it seems more like a micro issue given that they (mostly) work as outputs.
Logged

Global Moderator
Dallas
Online Online
Shannon Member
*****
Karma: 208
Posts: 12937
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
Is this a known behavior for the 328? 

No.
Logged

Manchester (England England)
Online Online
Brattain Member
*****
Karma: 627
Posts: 34245
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Inputs not connected to anything float and will act like you saw.
The pin 8 thing sounds wrong but I bet this is something you are missunderstanding. As it is not a normal board can you post a picture. Are we talking about the real pin 8 or digital pin 8?
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 2
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Inputs not connected to anything float and will act like you saw.

Right, which is why I was using the internal pull-ups.  I'm clearly not doing that wrong since some pins work as expected when I do that.

The boards are identical to an official nano, just not made by Gravitech.  The fact that most pins work correctly as outputs suggests that the board is fine to me.
Logged

Manchester (England England)
Online Online
Brattain Member
*****
Karma: 627
Posts: 34245
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
The fact that most pins work correctly as outputs suggests that the board is fine to me.
So what is your explanation of the fact that not all the pins work? I would suggest that it might be a quality control issue due to the fact you are using a rip off boar.
If it is not the board or wiring then it must be the processor.
Logged

Fort Lauderdale, FL
Offline Offline
Faraday Member
**
Karma: 71
Posts: 6144
Baldengineer
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Right, which is why I was using the internal pull-ups.  I'm clearly not doing that wrong since some pins work as expected when I do that.
Based on the code you (didn't) post I agree (or disagree) that you are using them wrong.
Logged

Capacitor Expert By Day, Enginerd by night.  ||  Personal Blog: www.baldengineer.com  || Electronics Tutorials for Beginners:  www.addohms.c

Pages: [1]   Go Up
Jump to: