interfacing PS/2 voltage levels to CMOS

Feb 17, 2004 8 Replies

I would like to interface the inputs of a CMOS microcontroller with a PS/2 signal. What interface circuitry should I put in between the PS/2 signal and the microcontroller inputs? It should be able to accept the standard PS/2 input voltages. Supply Voltage is 5V dc.



Standard PS/2 input voltages:



High-Level Input Voltage: 5.0V - Pullup (minimum) Low-Level Input Voltage: 0.5V (maximum)



DC Characteristics of the CMOS microcontroller:



Input Low voltage: -0.5V...(0.3)*Vcc Input High Voltage: (0.6)*Vcc...Vcc+0.5V



Any suggestions would be greatly appreciated.


Not quite sure what you mean by "PS/2 levels" but judging from your incomplete description I would suggest using copper wires as interface hardware.

and

The logic levels should be fine with each other. You can use bare wire. I would put some small resistor values in-line with each signal and perhaps

120pF capacitors to ground to eliminate some noise susceptibility.

Noel

Noel's Lab www.noels-lab.com Chips, firmware, circuits and embedded systems

Thank you for all the replies. Unfortunately I posted the wrong PS/2 levels. Here are the right ones. It seems TTL to me.

High-Level Input Voltage: 2.0V (minimum) Low-Level Input Voltage: 0.5V (maximum)

Could you please suggest some circuitry for this TTL to CMOS problem?

Laszlo

PS/2

Could you please tell us what the loading on the PS/2 lines are? And then what the high and low level _output_ voltages for your microcontroller are?

You may very well find your microcontroller can output these voltage levels directly -- many today have I/O pins that can, e.g., drive LEDs directly and have far more than enough 'oomph' (drive) to interface with TTL.

---Joel Kolstad

It is unlikley that you will have any problem directly connecting the PS/2 device to your microcontroller.

It is a good idea to add buffers to your signal though, and you could guarntee TTL compatiblity by adding a TTL compatible buffer in front of your CMOS device. I doubt many cheapo mouse and keyboard makers even go through the trouble of complying with TTL signal levels. Most uC's and logic devices are CMOS these days, other than special line drivers and whatnot. Try the 7407 or 74132 (schmitt input) buffers. Good Luck.

-J

The interface is still a wire. The thing you may have to worry about is the current drawn at a low level input.

Please DO NOT toppost. I have fixed this one.

Chuck F (cbfalconer@yahoo.com) (cbfalconer@worldnet.att.net) Available for consulting/temporary embedded and systems. USE worldnet address!

Laszlo,

Essentially, you don't have to worry about it. Your microcontroller will be using CMOS outputs. These will be able to comfortably meet the PS/2 port specifications. I've done this quite a bit. I've even used 3V micros to drive the PS/2 port.

I hope you aren't getting confused with CMOS input and output levels in trying to drive the TTL inputs. Standard CMOS inputs are 33%VDD and 66%VDD but you won't find this on most micros. You'll usually find input requirements of 0.8V (max low) and 2.0V (min high). The CMOS outputs usually drive a 0.6V (max low) and a VDD-0.7V (min high). Theses definitely exceed the TTL and CMOS input requirements. Relax.

You're only real issues concerning input buffer circuitry will be static protection and noise elimination. Both of these can usually be resolved with a single resistor and capacitor for each signal.

Noel

Laszlo Cser wrote:

Noel's Lab www.noels-lab.com Chips, firmware, circuits and embedded systems

...and possibly a network to provide some protection against static discharge.

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required