USB connection & use of PIN 0 (serial rx)?

Hi,

Q1 - If I want to receive serial comms from another device via coming in on PIN 0 (serial receive) does the the USB connection from the board to my PC have to be disconnected?

Q2- If yes, then how could I monitor the incoming serial via the Arduino IDE's serial monitor?

thanks

I think it would interfere. Consider using software serial to keep your otHer device off the pc serial port and let the arduino deliberately log anything you're interested in to the pc's serial.

My understanding is that serial tx/rx are bridged and go out pins 0 and 1 as well as the serial.

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

Serial. It communicates on digital pins 0 (RX) and 1 (TX) as well as with the computer via USB. Thus, if you use these functions, you cannot also use pins 0 and 1 for digital input or output.

As long as you don't use those ports for something else you're fine.

thanks guys - understand than I should use the USB port for serial at the same time I'm already having to use PIN 0 from my RF receiver then.

I'm still not sure how to "view" what is being received by the Arduino? i.e. I don't really understand: "Consider using software serial to keep your otHer device off the pc serial port and let the arduino deliberately log anything you're interested in to the pc's serial"

So if I can't use the USB port back to the PC with the Arduino IDE's serial monitor, then how would I view on my PC what is coming in on the board's PIN 0 (or perhaps more precisely what the serial chip that takes PIN 0 as an input deciphers)? :-[

You can use either the serial monitor in the arduino ide, or hyperterminal in Windows to view serial output. Either will work fine.

but to use the Serial Monitor doesn't this imply I'll have to have the board's USB port to connect to the PC? in which case wouldn't this clash with the serial input/output from PINs 0 & 1?

Serial. It communicates on digital pins 0 (RX) and 1 (TX) as well as with the computer via USB.

You can use both

ok thanks (I was getting conflicting info when searching on this subject)

I'm basically having trouble being able to see any serial output using my RF Tx and Rx device, and have a thread at http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1277035059/5#5 regarding this...quite frustrating

Q1 - If I want to receive serial comms from another device via coming in on PIN 0 (serial receive) does the the USB connection from the board to my PC have to be disconnected?

No you don't have to disconnect it, however what you have to do is make sure you don't send serial data from the PC to the Arduino USB serial port as the data would clash and garble with the external serial data you have wired going to pin 0.

Q2- If yes, then how could I monitor the incoming serial via the Arduino IDE's serial monitor?

Again no. And the serial hardware and software on the Arduino allows for independent full duplex communications, so you can still have serial output commands in your Arduino sketch and the data will show up in the PC serial monitor's receive window.

Another more common solution is to use one of the Arduino serial software libraries to handle the external serial receive data (to any pin) and leave pins 0 and 1 as is for PC use. You could then have code in your program to send anything received from the software serial to the normal hardware serial so it can be monitored on the PC

PS: you might want to read the user feedback comments on those RF modules, they can be quite tricky to get working reliably. http://www.sparkfun.com/commerce/product_info.php?products_id=8946

Lefty