Veronica 6502 gets keyboard input via USB

PS2

When building a homebrew computer, there are a few milestones that make all the work seem worth it. Of course, seeing the CPU step through address lines on the blinkenlights is near the top, but even more important is being able to type a character on a keyboard and have it show up on a display. [Quinn] didn’t want her Veronica computer to deal with serial terminals or PS/2 keyboards when she typed her first characters in; instead she wanted to read a USB keyboard¬†using 80s-era hardware.

Back in the early days of USB, design specs and keyboard manufacturers included a legacy mode in nearly every USB keyboard ever manufactured. This allows a USB keyboard to work with the ancient PS/2 protocol. [Quinn] tapped into that functionality nearly every PS/2 keyboard has using a 6522 Versatile Interface Adapter. This VIA is in the same family of chips as the venerable 6502 CPU that provides GPIO pins and timers.

[Quinn] connected the keyboard connector tapped for PS/2 input to an ATtiny13. This microcontroller reads the scan codes from the keyboards and sends them to the VIA and the rest of Veronica. It’s quite a bit of work to get to this point, but [Quinn] finally has a computer she can type on, the first step to developing software for her homebrew computer.

Comments

  1. Caleb says:

    This is my favorite project to see on HAD. Keep up the good work!

  2. The R6502 family part number that contained the user interfaces, but no RAM was the R6520, conceivably the same as the M6820 (for the M6800 family of processors), the user had the twin I/O ports plus timers. However most users of the R6502 and its relatives, that is other companies who made the processor, plus of course the original vendor, chose the R6522.

  3. Whatnot says:

    Made me wonder if there are PS/2 libraries for arduino and such, and a cursory search made me find one for the teensy (http://pjrc.com/teensy/td_libs_PS2Keyboard.html) so it seems there probably are.

    Handy to know because to be honest; I’m running out of USB ports on my system, and I have 12 of them I might add..

    Now I’m wondering though if those ubiquitous interface chips that are on every motherboard can be easily interfaced to an arduino/attiny/etc. since those chips not only have PS/2 but also serial and sometimes parallel and floppy drive connections and it might be useful to have that available as a standalone chip..

    • phire says:

      Serial and parallel ports are getting rare these days and the floppy drive connector is practically worthless, the controller pipes out raw servo control signals and directly reads back the signal from the read head.

      The annoying thing is, these interface chips have many suable standardized interfaces like spi and i2c, but even if they are routed to a easily accessible pin header they are never documented.

  4. rasz says:

    so its still ps/2, just using usb plug, right?
    I sem to remember someone implemented usb low speed host on Atmel8 for this exact purpose – it only worked with usb HID devices.

  5. Lloyd Atkinson says:

    You learn something new every day, I never knew USB keyboards have a PS/2 mode in them.

  6. Andre says:

    This is really nice. If you want to go beyond this PS/2 mode, you could use a real USB chip with SPI interface, and use a real USB stack on the 6502. See my github page here:
    https://github.com/fachat/usb65

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