Serial Port Programming
Posted on 1997-05-10
My Powerplant application doesn't receive characters from an external device. What have I done wrong (see below)?
I have a PowerMac 7600 that communicates with an RS-232C device through the serial port. When a certain string is sent to the device, a LED blinks and confirms that the device received something. The Mac doesn't get anything back
from the RS-232 device.
To verify that the string is received correctly I've used another 7600 to simulate the device. Yes, it receives the string correctly.
The correct parameters (speed, parity, etc.) are set. This has been checked with a PC-to-the-external-device test. The communication with a PC works well.
There doesn't seem to be anything wrong except maybe (?) two things: problems with Mac-to-device (RS-422 to RS-232) or
bad cable design.
The cable used is a Mini DIN-8 (Mac side) to 9-Pin (device side). According to the spec of the device (talked with manufacturer too) the RS-232 side of the cable looks like:
Pin No. Signal
The RS-232 9-pin is connected to the Mini DIN-8 according to:
RS-232 Mini DIN-8
1 4 (SG)
2 8 (RxD+)
3 6 (TxD+)
9 4 (SG)
No handshaking is used. RS-232 pins #4 and #5 are connected to each other. Mini DIN-8 pins #1 and #2 are connected to each other.