Changes

Talk:PS2Mouse

1,664 bytes added, 14:15, 9 April 2010
:More commonly Com changes at 1/50s rate (when reading the keyboard; which is read only each 6th interrupt). If the software reads only the joystick port, without keyboard, then Com would stay LOW forever.
:Oh, just noticed a bug in your circuit :-) the Com pin is an open collector output, so there should be a pull-up in your schematic... unless the 74LS240 is having internal pull-ups on the /OE pins(?)
 
Hi Nocash,
hope you enjoyed the coffee. Firstly as you know, the Com pin normally only goes low when the CPC is reading the Joystick or keyboard Y10 (at 1/50s as you stated). Theoretically yes, the z80 could set the 8255 pin (to the 74LS145) and the Com pin would remain low forever, but that's not what it does. Stick an oscilloscope on the Com pin when the Art package is running and you'll see it's not permanently low, so I CAN trust on this, because I didn't assume it, I measured it. So the pin going low IS indicating when the software is reading the port. Besides that, the software also reads the keyboard, so setting this pin low all of the time would mess up the keyboard scanning.
 
Correct, the buffer isn't a latch, but it doesn't need to be, the outputs of the 74LS240 are being read by IOA of the AY-8912 which is a latch, the reason for the 74LS240 is to ensure that highs and lows are only present when the Com port goes low.
 
Regarding the "bug" in the circuit: Technically correct, an open collector output should usually have a pull-up resistor, but in this case it is not really required, if you reference the 74LS145 Datsheet (one which shows the internal equivalent circuits), you'll see that the outputs are internally strapped to Vcc through a diode with a nominal resistance of 17K, which is enough to keep the circuits' high and low levels happy, and at the relatively low frequencies in this application, using a pull-up resistor to "sharpen the edges" of the signal isn't required. I had a pull-up resistor on my original prototype, but I removed it because it was overkill and the circuit works perfectly well without it.
 
Bryce
1,179
edits