Quote:
Originally Posted by b3lha
... They seem to be sending and receiving the data one bit at a time by directly accessing the handshaking lines.
|
That's exactly what they're doing. They're using the RTS input to read the ECU's transmit data output, and using the DTR output to pulse bits into the ECU's receive data input.
Why? Well, if you don't know whether the device you want to communicate with uses standard RS-232 bit rates or word formats, this method gives an assembly language program complete control over the format and timing.
The monitor code was first written to work with the PC's parallel port in a similar way (flipping bits "the hard way"). This circuit may have just been a cheap and easy way to use a serial port while re-using most of the previous code.
The original code and parallel port circuit may have simply been a cheap and easy way to talk to the ECU without having to build an RS-232–to–TTL converter.