I'm working on a project with an Arduino Mega 2560. I connected the board to a MAX232CPE in order to communicate in serial mode with a thermal printer.
I connected the MAX232 to one of the 3 extra serial ports of the Mega 2560 and did all the required wiring adding capacitors. I did not connect the RTS terminal.
No message seems to be sent to the thermal printer, but the communication works perfectly when trying to send a message to the debugging computer.
The very same computer communicating with the printer works perfectly, opening a serial port and sending some data.
In example, If I send the command PRINT XYZ, the printer will print the message when communicating with the computer, but nothing when communicating with the arduino. the very same message has been successfully read by the computer when connected to the RS232 port of the arduino.
What could the problem be?
Electronic – Arduino serial communication with printer
arduinomax232rs232serial
Related Topic
- Simple Serial-to Wifi communication
- Electronic – arduino – Max232 giving incorrect values at pins
- ESP8266 and Arduino – SoftwareSerial vs Serial problem
- Electrical – How to control thermal printer from micro-controller and choose it
- Electronic – Two devices on Y 9pin Serial cable to 25pin printer input – Data Corruption
Best Answer
RS232 signal lines have fixed directions.
If the arduino is talking to the computer, and the printer is talking to the computer, using the same cable, then I'm pretty sure you will need a null modem connection (RX / TX etc crossed over) between the Arduino and the printer.
Also the printer may use hardware flow control. If so, you will to connect up RTS / CTS and perhaps assert DTR.