A 6502 machine - Part 2


This is part 2 in a series of posts in which I will document my journey (and mistakes) of building a 6502 based computer.

A simple screen

A computer with just a blinking light is not much fun, so my first improvement was to add a seven segment display module. Jaycar has a 8 digit 7 segment display module that uses an SPI interface.

My own screen design

The Jaycar display proved the computer is doing stuff, but I need to design my own display if I want a real 1980s style machine.

The aim is to display three full bytes. Depending on the use case this will be a 16 bit address and a byte of memory or it can be the A,X,Y registers.

So this means we need 6 digits of seven segments that can display hex. It turns out that nobody makes seven segment decoders that handle hex.

The plan then moved to using 74HC595 shift regsters in a chain that will directly drive the seven segments. And from a software point of view this will still be much like an SPI bus.

Jaycar did not have 6 red LED modules in stock so I ended up with 4 red and 2 blue. This looks kind of cool but it is not keeping with the 1980s style, so the final design will be all done in red LEDs.

This is using a 330 ohm resistor on each driver line but it seems a bit brighter than I planned.

Software?

I will share all the code later in the project, but in short I have a lookup table that takes a lower half byte and turns it into the right bit pattern for hex display. Then I have code that pushes the bit pattern out by bit banging serial. The code I have at this point gets about 200 screen updates per second.

What’s next?

In Part 3 I will cover the keypad design.