I recently rescued my Tandy CGP-115 plotter from the attic and had the idea to try and drive it from a modern machine.
I have a FTDI CHIPI-X10 RS-232 adapter and installed drivers on a MacBook.
I have assembled a lead (DE-9 female to 4-pin DIN), according to what I've been able to read up about the Tandy Color Computer serial port, as per the following:
- TXD - pin 3 -> DIN pin 4
- GND - pin 5 -> DIN pin 3
- CTS - pin 8 -> DIN pin 2
I believe I have the correct Python code to send data to the plotter:
import serial import time ser = serial.Serial(port='/dev/tty.usbserial-FT2XIBOF', bytesize=serial.SEVENBITS, baudrate=600, rtscts=True, dsrdtr=True, stopbits=serial.STOPBITS_TWO) ser.write(b"Hello, world! This is a message from a MacBook in 2020.\n") #ser.write(b"ABCDEFGHIJKLMNOP") ser.flush() time.sleep(5) ser.close()
Something seems to be not right - when I send the following:
ABCDEFGHIJKLMNOP I get the following:
AJKLMNOPIJKLMNOP. Occasionally this comes out right.
Hello, world! This is a message from a MacBook in 2020. prints as something like:
Hello, world! This is a messaa i 2020. 2020. 2020.
So something's up, obviously, arguably something to do with the handshaking. Have I wired the cable correctly? I have tried the parallel port and that appears to work fine. (And why the echoing of the last few chars? Could that be electrical rather than logical?)
I have also tried wiring other pins to DIN pin 2 in case I've misunderstood the handshaking: DSR, DTR, DSR/CTS together, even RXD, with similar results. Sometimes the printing is delayed for a second or two, suggesting the sender timed out the handshake and just flushed the data anyways. I've also tried various combinations in the code,
dsrdtr=False, without success.
Any advice much appreciated.