Go Down

Topic: Duemilanove to Desktop Computer Serial Port Direct Connection (Read 665 times) previous topic - next topic

gachie

Hi guys,
I'm trying to connect a Duemilanove to the computer's on-board serial port as below:
Computer Rx to Duemilanove Tx and Computer Tx to duemilanove Rx

Problem is that, if I send a value like 356 from the duemilanove, my serial monitor displays funny characters like 2??[][]åë.

If I use the USB cable to connect the duemilanove to the computer it works fine but using the method described above, it doesn't. I dont want to use the USB cable because of some reasons which I can disclose later.

Where am I going wrong? Any help will be highly appreciated.

Coding Badly



el_supremo

The onboard serial connection almost certainly uses standard RS-232 signalling where the voltages are plus and minus 12V. The voltages might be less than that e.g. +/- 10V but they are not compatible with direct connection to the Arduino and you will be very lucky if you have not already blown the Arduino's two serial port pins or even the whole chip. RS232 signals are also the logical inverse of what the Arduino uses, which is TTL levels of zero and five volts.
You must use some sort of conversion between the voltage levels. This can be as simple as a pair of transistors (with resistors) or a MAX-232 (or similar) chip.

Pete

gachie

Thanks el_supremo, I used the Max232 and it worked perfectly.

Go Up