Hello, If I want to communicate to some serial device trough the RX/TX pins but how to debug it? I cant connect arduino to my PC in the same time and send the output from the device to the Serial Monitor. Is there any way to use them both? This serial device will return some text strings and I want to read them. Thanks!
You could use a Mega to get the code running then put it back on the Deum...heck I can never spell that word.
Otherwise maybe use Software serial or new SS for the job and hardware serial for a debugging output.
I only have one Arduino Duemilanove :(
How are you connecting the device you want to read to the Arduino? You could use two pins other than the serial pins 0 and 1, and use NewSoftSerial to read from/write to the device using the other pins. Then, Serial can be used to talk to the PC.
Thank you PaulS, I will test it with different pins using NewSoftSerial and Serial for the PC.
Maybe the free terminal Realterm could help you :
It has a port ‘sniffing’ feature
In combination with the com0com.
The Null-modem emulator (com0com) is a kernel-mode virtual serial port driver for Windows. You can create an unlimited number of virtual COM port pairs and use any pair to connect one COM port based application to another.
Terminal from brad++ also has some handy features: Terminal
Hope it helps, Frosybyte
current project: http://sites.google.com/site/arduinofocus/
Thanks @astrofrostbyte, but I want to debug it inside Arduino. The communication PC<->Arduino is fine.
I have found that a bus pirate http://dangerousprototypes.com/docs/Bus_Pirate is a useful tool for debugging serial comms. They're pretty cheap and easy to use.
anio: If I want to communicate to some serial device trough the RX/TX pins but how to debug it? I cant connect arduino to my PC in the same time and send the output from the device to the Serial Monitor. Is there any way to use them both? This serial device will return some text strings and I want to read them.
What I did when debugging the RFID gadget was just plug its output into D0 (Rx pin) and leave D1 (Tx) unconnected. So I got the data from the reader (with Serial.Read) but if I display it (with Serial.print) it goes back to the console. This won't work if you need to send stuff to the serial device, but you said it would "return some text strings".
There are lots of options available to you.
You could use a program like scope to monitor the traffic between the Arduino and the peripheral. This can be done for next to nothing if you can find an unwanted "obsolete" PC/laptop with a couple of serial ports.
You could attach an LCD or some LEDs with a shift register to display debugging status info with minimal pin usage. There are I2C interfaces available off-the-shelf that are pretty cheap.
You'll probably want another Arduino eventually, anyway, so buy one now, and hook it up as an I2C slave to your project. Then it can handle communications with the PC.