Reverse engineering a rackmount display

Well, let’s get on to some real, original hacking (be prepared for some seriously crappy code).  Now, as I’m sure will be a popular theme for a while: I have no idea when I got this thing, nor did I save the motherboard to see where everything was originally hooked up.  Luckily this thing only has 4 chips, all of which fairly straightforward and easy to understand.  Before we get to that, let’s look at the button matrix.

crappy notes (1)

Now, the numbers and letters for the buttons are not defined by the labels on the front, but the markings on the board.

This unpopulated header has the entire button matrix pinned out to it, very useful for testing.  Now that we have the matrix worked out as seen in my really crappy notes, we’ll see where it’s hooked up to.  One side of the matrix goes to an mc1413 (also known as the uln2003a), a very common part, a darlington transistor array.  This chip can be thought of as simply a pass-through as far as the logic is concerned.  Technically it allows more current to be sourced from the logic chips to drive things like LEDs (we’ll get to that later).  The 1413 is connected to a 4017 decade counter, it steps through each of the outputs one at a time.  The other side of the matrix is hooked up to an mc14076, the 4076 is a 4bit register, it allows you to latch in the data, then read it later.  So, so far to just read the buttons (and dip switches) we (re)set the 4017, latch the data, read it, increment the 4017, latch, read, increment…. and it eventually rolls over.  Now how about the outputs?

The display is hooked up as you might expect, the 7-segments are all hooked up in parallel and the common cathodes are hooked up to the 4017.  The 14511 is a BCD to 7-segment driver, that means it can be fed binary data over a 4-bit bus and it directly drives the displays.  The 4bit bus is the same one that you use to read the buttons, even though it has enough pins on ribbon cable to do it with only one-directional pins.  I can assume that the original circuitry it hooked up to either used a 4bit bus, or could only make the 8bit port all input or all output, so there was no reason to use separate pins.  There are only eight displays and ten positions on the 4017, so the four LEDs on the bottom are hooked up to the 7-segment driver so that segments 9 and 10 are LEDs 0 and 1, and 2 and 3.  They are hooked up to the segments so that a zero turns both segments on, a one turns one on, and a two turns the other one on.  Feeding anything but binary 0-9 results in a a blank display (or both LEDs off).  The method for writing to the displays is simply to (re)set the 4017, set the data bus, increment, set, increment, set…

crappy notes (2)

There are a couple of other lines I haven’t n mentioned, first is the one I dubbed “output_line” which switches the register off to allow us to use data lines to output to the 7-segment driver without having the key matrix data corrupt it.  The next is one I have dubbed “colons” because I thought that drove the decimal points on all the displays making colons (since they are  flipped upside down for every other one).  I haven’t gotten that to work yet, maybe I’ll take a closer look at it later.  The whole data read and write sequence I have now goes like this: reset 4017 (only at the beginning, or every time it should be back at the beginning to reset any corruption), set data bus as inputs, set output line high, toggle keypad latch, read in data bus, set data bus as outputs, set data bus all low, set output line low, write data bus with a digit, increment 4017, repeat…

The really clever thing about these 7-segments I only learned after I was tracing this board out, they’re meant to work upside down.  What I mean by that is that the pins mirrored when they are flipped upside down control the segments that are also mirrored,  This means that you can still run the traces on the board almost straight and have them all hooked up in parallel even with every other one upside down.  I always hated the confusing pinout on these thing, but after I learned this I just think they’re absolutely brilliant.  I originally tried to write the button reading pattern from my understanding of the circuit, but eventually I just tried it and re-mapped it manually.  All the chips also happen to work at 5v, so just wire it up and off you go.  My code is on github here, and the rest of my pictures are here.


Tags: , , ,

One Response to “Reverse engineering a rackmount display”

  1. Don’t throw that away: how to stay sharp and be productive | Evan's Techie-Blog Says:

    […] a driver for it.  Now I tend to research the driver chips and only break the circuit where the least amount of modification is necessary to make the circuit do what I want.   These are both valid methods of using some […]

Leave a Reply

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

You are commenting using your 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 )

Connecting to %s

%d bloggers like this: