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.

8 thoughts on “Veronica 6502 Gets Keyboard Input Via USB

  1. 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.

  2. 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..

    1. 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.

Leave a Reply to CalebCancel reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.