I am trying to use the Serial1, Serial2 and Serial 3 (pin 14-19) of my arduino 2560 to read digital signal of my lab's instruments. I used a RS232 to TTL board (MAX3232) to convert the digital signals from the instruments, however there is no response.
I did some simple test.
i sent out some letters through the MAX3232 and the used a rs232 to usb converter to convert the signal and my computer can receive the letters and displayed using the arduino software. however, when i send back some letters, the ardunio could not receive.
Here is the code:
// to display something in arduino software
// to see if mega2560 recieve anything from the computer
int aaa = Serial1.read();
actually i received some random number for the variable "aaa" and the LED always turned on.
Do you know how can I change the code so that I can receive digitial signal from rs232 using max3232 and the mega 2560 board.
Hope you can help!