Go Down

Topic: Digital Pin bizzareness (Read 643 times) previous topic - next topic

owl_tim

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.

Coding Badly

Quote
Is this a known behavior for the 328? 


No.

Grumpy_Mike

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?

owl_tim


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.

Grumpy_Mike

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.

James C4S


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.
Capacitor Expert By Day, Enginerd by night.  ||  Personal Blog: www.baldengineer.com  || Electronics Tutorials for Beginners:  www.addohms.com

Go Up