I have two push buttons which when pressed send a set of commands out the serial port. When the arduino is connected via usb cable and viewing the serial communications in hyperterminal everything looks great. When I connect the arduino through the tx and rx pins to a usb to serial connector and view in the hyperterminal I get this "_aÖö+
?å" or this "_aÖö+
?å" depending on which button is pressed. Any ideas on what is going on here? Bad usb to serial converter (I just bought it, a Belkin F5U109)? Here is the code which I think is fine but just in case.
Thanks in advance for any help.
int sensePin2 = 2;
int sensePin3 = 3;
int value2=0;
int value3=0;
void setup() {
Serial.begin(9600);
// read from the sense pin
pinMode(sensePin2, INPUT);
pinMode(sensePin3, INPUT);
pins 0 and 1 straight to db9 on the usb/232 adapter. proper pins are grounded. I did not use a level converting transceiver. . .didn't think I needed one. Do I?
Thanks
On second thought the Belkin has a ADM211 chip which is a "+5V CMOS RS-232 200kBPS Transceiver with 4 Drivers, 5 Receivers" so that should take care of the transceiver i would think.
The TX and RX of Arduino is TTL level (0 or 5 volts).
The RS232 is -15/+15 volts
The USB is (+5volts) data.
Your connections won't work because you must convert the TTL to RS-232 level. You cannot connect RX and TX directly to your RS232-USB adapter.
You're working with 3 types of signal (TTL/RS232/USB), but you have only one adapter (RS232 to USB).
You must use a TTL to RS232 converter between TX/RX and your RS232/USB adapter, or use a TTL/USB adapter, directly from Arduino RX/TX to USB.
Thanks for the help. So if I understand correctly the FTDI chip on the arduino takes care of the TTL to USB conversion. The serial communications from the atmel can only communicate directly with another serial port using TTL. Finally I need to convert TTL to RS-232 if I want to use the USB to serial adapter.
So one last question. . .any recommendations for a TTL to RS232 IC?