Pages: [1]   Go Down
Author Topic: [Solved] Digital inputs 0 and 1 not working  (Read 653 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Newbie
*
Karma: 0
Posts: 3
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hello there,

I just got my first board yesterday and I'm having problems with reading digital ports 0 and 1. Whenever I connect i.e. buttons to these, reading both these ports ALWAYS seem HIGH, even with 10k pull downs. I know they are serial ports, so I've also tried running a simple button test on battery power instead with USB disconnected. Set as outputs, they both work fine (blink test on both). I've already tried looking for posts about this or something in manuals, but haven't been able to find anything so far. Am I just stupid for overlooking something or do my Atmel's 0 and 1 inputs seem defective?

Thanks,

Note: Arduino Duemilanove
« Last Edit: November 03, 2010, 03:27:14 pm by Coenie » Logged

Somewhere in the Sonoran Desert
Offline Offline
Full Member
***
Karma: 1
Posts: 108
"This was not intended to be a factual statement."
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

What happens when you use the same circuit and sketch on inputs 2 and 3?

Have you measured the voltage on ports 0 and 1 when you close the switch?
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 3
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Pins 2 and up work perfectly. Haven't measured the voltage yet, good point, will do that later.
Logged

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


Does your Sketch call Serial.begin?

Which IDE version are you using?
Logged

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

Pins 0 and 1 are used on the serial interface an are not normally used for general I/O. They are connected to the USB chip through 1K resistors so you need some signal stronger than that to pull them.
Logged

Somewhere in the Sonoran Desert
Offline Offline
Full Member
***
Karma: 1
Posts: 108
"This was not intended to be a factual statement."
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Grumpy's right. I just wanted you to figure out why the voltage wasn't gonna be what you expected.

You weren't overlooking anything really, you knew they were used for Serial but I bet you didn't look at the schematic and see the difference.

The other option is to remove the resistors (R8 and R9). Then it should behave like all the rest.
« Last Edit: November 03, 2010, 01:38:56 pm by timmyw » Logged

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

Quote
Then it should behave like all the rest.
It will but then you can't upload a program until you put them back.
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 3
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Got it working now... Pull down resistor was too high to overcome the signal from the FTDI chip. Lowered the resitor value until it accepted the button state change. But now I can't flash anymore. Think it's best to keep the line either detachable on the fianl design of the intended application, or just use two other inputs, won't need all of them anyway.

At least I've found the reason why they didn't work now. Thanks guys! smiley-grin
Logged

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

Quote
But now I can't flash anymore
Yes I said that, you can always put a switch in like in this project:-
http://www.thebox.myzen.co.uk/Hardware/MIDI_Shield.html
Logged

Pages: [1]   Go Up
Jump to: