So I have a device that can be controlled with serial, here are the specs from the manual:
Pin Characteristics Description Function
1 nc
2 output TX serial transmitting signal
3 input RX serial receiving signal
4 combined with pin 6
5 ground ground
6 combined with pin 4
7 nc
8 nc
9 nc
Serial interface parameters
• Bits per second: 9600
• Data bits: 8
• Parity: none
• Stop bits: 1
• Protocol: none
Serial cable
The interface is designed for a serial cable with 1:1 interconnection, and Sub-D 9-pin plug / socket
connectors.
Command set for the serial interface
SCPI commands for the serial interface - overview
*ESR?
*IDN?
ADJUST:?
ADJUST:START
HEATER:1:OFF
HEATER:1:ON
...
So can I connect a serial cable to pins 1, 2 and ground then just use Serial.println(HEATER:1:ON) to turn the devices heater on, or is it not so simple?
So can I connect a serial cable to pins 1, 2 and ground
I guess you meant pins 0 and 1 as well as GND.
Serial.println(HEATER:1:ON)
I would try to use double quotes around the string constant.
The interface is designed for a serial cable with 1:1 interconnection, and Sub-D 9-pin plug / socket
connectors.
Sounds like being a RS232 connection. This is not voltage compatible with the TTL level the Arduino uses. If you put a MAX232 (or similar) in between, you should succeed.
Ahh, I guess I was getting a bit confused because everyone refers to RS232 as serial, so I guess I will need to use the Max232 or get a RS232 shield. I was hoping I wouldn't have to buy any components to get this working, oh well!
I will have a look around and see how much it would cost to make something up.
The Rx & Tx lights are driven by the USB/Serial adapter, they will only light up when USB comm's happen.
RTS/CTS - shouldn't need anything.
0/1 are 'initiated' by the Serial.begin( ); library.
Try swapping the 0/1 wires also - so you have Rx to Tx, and Tx to Rx.
You can try a loopback test - connect pins 2 & 3 on the RS232, send a character out & see if you get it back. Use the LED on D13 to indicate if data in agrees with data out.