Issues with RX Pin on Duemilanove

Greetings,

I'm having issues receiving serial data on the RX pin (pin 0) on the arduino duemilanove. I can't receive data because the pin is always held high around 5 V and I can't find any way to change it. I don't think it's a code issue because as soon as I power the board the pin goes high and stays there. Any ideas as to what might be going on? Thanks.

Well pin 0 also wires to the serial data output pin from the FTDI serial USB convertor chip, so it probably defaults to a high. However it is wired via a 1k ohm series resistor. So this would act like a 1k ohm pull-up and shouldn't be a problem to 'over-ride' by any external signal wired to pin 0. By the way a high is the default stop (idle state, no traffic) condition for a serial link.

Lefty

Thanks for the input.

The external signal I'm trying to "override" it with is coming from the following RF receiver module:

http://www.sparkfun.com/datasheets/Wireless/General/MO-RX3400.pdf

I confirmed with a scope that the receiver was working as intended, with another arduino hooked up to a transmitter that was sending serial data. But, whenever I connect the receiver to the RX pin, it just stays high and the data doesn't get through.

It would make sense if I didn't take the link out of its idle state, but I declare

Serial.begin(1200);

at the beginning of my code, and

variable = Serial.read(); Serial.println(variable,DEC);

just returns 255 from the high voltage on the pin.

Serial.begin(1200);

at the beginning of my code, and 

variable = Serial.read();
Serial.println(variable,DEC);

just returns 255 from the high voltage on the pin.

You first have to test if a serial character is avalible before you do a Serial.read() statement.

http://arduino.cc/en/Serial/Available

Lefty

You mean something like:

if (Serial.available() > 0) { variable = Serial.read(); Serial.println(variable,DEC); }

?

edit: ah ok, I'll try it out tomorrow.

yes

Checking if a character was available didn't work. I was able to receive signals by defining a separate rx pin through SoftwareSerial. However, considering the timing issues and the advantages of hardware serial, I would much rather get this working on the arduino's RX pin. Why is it so resistant to overriding voltages? With a 1 kOhm pull-up it should be working fine. Any ideas?

No not really. Being a hardware type I would at this stage pull out my O-scope and look at what's happening on the rx pin when data is coming in.

Lefty

Hi Kei,

I'm having this exact same problem - I'm also using a RF receiver module.

It occurs to me that if you are powering the Arduino over USB from a PC, this may cause a problem, because the PC is wired to the same RX pin 0 (via the FTDI chip), and will be holding the line high (the idle state for serial communications).

Having said that, I still haven't managed to get it working. I have an o'scope and can confirm that the data are available on the RF Receiver's output, but as soon as I connect the output to the Arduino's pin 0, it just goes straight up to 5v and stays there. If I set pin 3 to an input and connect there, then it works.

I'm also trying to get this to work on a bare FTDI USB Serial chip, and getting similar problems. I started a thread about it over at sparkfun, but so far no progress. This forum won't let me post the link in my first post, so I'll post the link next

http://forum.sparkfun.com/viewtopic.php?f=13&t=22058

Oh, and I realise now that my whole 'powering over USB holding the pin high' was already addressed by retrolefty.