|
Re: TTL Serial Port and PS2 Mouse Interface
Quote:
|
Originally Posted by Dave Flowerday
There are two important differences between the PS/2 protocol and RS-232: first is that PS/2 is synchronous, which means there is a separate clock line which keeps the transmitter and receiver synchronized. In RS-232 (like a normal serial port), the transmissions are asynchronous, meaning there is no clock so the transmitter and receiver each have to know the baud rate ahead of time. The second important difference is that PS/2 uses the same pin for both Transmit and Receive. This is an electrical "trick" of sorts called open-collector, meaning the transmitter only ever actively drives the line to ground and otherwise leaves it unconnected (and a pullup somewhere else on the line makes sure the line stays at Vcc). RS-232 uses separate transmit and receive lines. So right off the bat there's some electrical incompatibilities. However, most microcontrollers with serial interfaces are very configurable and can often be configured for either synchronous or asynchronous mode, and the electrical problems could be fixed with a few external components. I haven't looked at the Microchip document in a while, but it might be possible to set up the TTL serial port to do PS/2. There'd still be a good amount of software necessary to do the higher-level PS/2 protocol, though.
|
The PIC can be configured for synchronous operation.
__________________
1139 Alumni
|