PS/2 Keyboard and Video Out support for Arduino UNO and compatibles (and the Half-Byte Console)

While this information is readily available on the Internet, I have, nonetheless, received requests on how to do this. The most recent was from Dave in the form of a question on a post about Tiny Basic.  So, I thought I’d write a post-with pictures-on how to connect these things to your UNO or compatible.

PS/2 Keyboard

Connecting the keyboard was a challenge for as I have dsylexia. See! Anyway, I had the hardest time figuring out how to wire up a PS/2 keyboard connector, but, I did and here’s how you can too!

WP_20150315_00_11_58_ProPINOUTS
  • Pin 1 to Pin 5 on chip (ATMEGA 328)
  • Pin 2 to GND
  • Pin 3 to Pin 4 on chip (ATMEGA 328)
  • Pin 5 to +5

Click on the image to see the PS/2 Keyboard connector from the BOTTOM. Pin 1 is on the right, pin 2 above it, pin 3 to the left, pin 4 to the left, pin 5 to the left and pin 6 to the left and down.

VIDEO

Video and mono audio can also be achieved.  Video is generated by soldering two resistors together on one end and then connecting the other ends to different pins on the chip.  Audio imagecomes directly from pin 11 on the 328 chip. Refer to the diagram.  For UNO and compatibles, you will need a 1k Ohm resistor connected to pin 9 for the sync signal and a 470 ohm resistor connected to pin 7 for the video itself. Software controls the actual generation of the signal.  The other ends of the resistors should be soldered together and form the composite video and goes to the center pin of the video connector. The other (or outer) pin of the video connector goes to ground. 

AUDIO

Audio is also generated by software and consists of Atari Pong style beeps.  Connect the center pin of the audio connector to pin 11 of the chip and the ground to the outer shell or other pin of the audio connector.

Libraries

You need the following libraries:

  • TVOUT (Google has announced that they are shutting down google code, so grab this while you can. I do not know where it will end up.)
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s