Wednesday 11 May 2016

Oric-1 USB Keyboard kit

I've converted many things with keyboards attached into USB keyboards over the years, and I get various requests for things to be converted. Often I can go back through the archive and send them a link to a post on this blog where I have done exactly that. Sometimes I get new ones. One that came in, quite a while ago actually, was to convert a USB conversion kit for an Oric-1.
This is one of those where there aren't that many around, so I get a bit twitchy about converting them. This request however came from an Oric user group (CEO - the French Club Europe Oric), who I presume would be using them responsibly. I knew I had an Oric-1, I had repaired it a while ago, but it was in part of my collection that wasn't accessible at the time. Before I had a chance to dig it out, I managed to pick up another Oric-1. This one was 'untested' in ebay terminology - i.e. broken.
There were lots of things inside that didn't look right, lots of chips had been replaced, the voltage regulator had been bypassed and several capacitors tacked on in various places. The ROM has also been changed from 2x8K originally to 1x16K, so all very suspicious and potentially what was left over after someone made one good Oric out of two.
With a bit of triage to sort out the power supply (5V direct in), it was not working. There was a nice pattern on the TV though. This is going to need a bit of work, which I will be doing in future (Update: Oric-1 Repair Part 1). For the moment, I've put the mainboard to one side and borrowed it's keyboard to build and test the Oric-1 USB keyboard conversion. The keyboard connection is quite neat, there is a 14 pin header on the back of the main board which plugs directly into a 14 pin socket on the back of the keyboard.
The pinout is a little unusual, there is a 4051 8 way mux on the back of the keyboard. This drives the 8 rows on the keyboard, and the 8 columns are wired directly. The Oric-1 uses 8 I/O pins on the AY-3-8912 sound chip for the columns, and various pins on it's 6522 to control the 4051. The 4051 appears to be setup to select one of the 8 rows and feed the output to an input on the 6522.
I've taken one of my generic USB keyboard controllers and fitted a 14 pin header and plugged it into the keyboard. Now that the microcontroller on there is driving the keyboard, it doesn't have to follow that pattern. The 4051 is bidirectional, so I have decided to reverse it, and set the common pin to 0V. This way I am using it to select which row to connect to 0V. I then read the columns, which are pulled high internally by the microcontroller, and any that are low are caused by a keypress. That worked fine first time, so I didn't investigate the alternative. It probably helps reduce the effort in scanning the keyboard for the Oric, but the USB microcontroller has nothing better to do that keep scanning the keyboard, so I left it to it.
Mapping the keyboard was fairly straightforward, most of the keys are in a reasonably standard and usable layout. Nothing particularly interesting to report there.
This is the Oric-1, but the same main board was also used in the later Oric Atmos, which has a much nicer looking keyboard.
The interface to the main board is the same, so this kit can be used on both the Oric-1 or the Oric Atmos.
You can order a conversion kit from My Tindie Store, with all the bits you would need, the USB controller, USB cable and mounting pillars, just add an Oric (preferably a broken one).

2023 Update

USB Keyboard Controller Kits are available from my Sell My Retro store: