Ryan Brooks's 6502 Nixie Clock
So, I wanted a Nixie
clock and I really wanted to design the hardware and program it
myself. Most
of the kits out there are based around a PIC or some other new, easy to
use microcontroller. I thought it would be much more interesting
to make a clock powered by an old school computer. UPDATED Oct-06
The result is a 6502-powered
Nixie clock. I started this project about two years ago
when large tubes (Z5680M in this case) were still
available. Since then, any large tube is 5x the price it
was -- if you can find them.
The design consists of three boards:
6502 controller
8k of SRAM and clock, Dallas DS1742
timekeeper RAM
8k of EPROM: 2764
I/O: 6522 VIA
Misc logic: 74LS00, 74LS138, DS1233 reset...
Shift board and HV drivers
Daisy chain of 24 bits of shift registers: 74LS595
BCD drivers: Russian 74141-alikes
HV power supply
Switch-mode: MC34063A - A design from the NeoNixie group
The display consists of four East German Z5680 (beautiful)
tubes for hours and minutes, and two Russian IN-18 tubes for
seconds. Each tube anode is fed via a 10kohm resistor and a
pot mounted on the back of the clock chassis. The
individual digit cathodes are then wired into the output of the 74141s
that decode a BCD input from the 74LS595s. The 595s (serial shift
registers with latches) are fed from three output lines on the 6522,
which I use as serial clock, data, and output latch. This
allows
you to use three lines of I/O to control the 24 bits necessary for 6
BCD digits.
Two of the boards, the 6502 controller and the shift board, were PCBs
that I designed in Protel 99. You can get the entire design
database for these here, as a zip file.
The HV
board was made with point-to-point wiring on a protoboard.
With these schematics and circuit board layouts with Gerber files,
you are welcome to duplicate my design. You can find the
6502 tasm source and S-record object code
here.
Pictures of the
construction are here.
Outputs - Port B
0,1,2 - Data, Clock and Strobe
3 - Alarm annucator (future: is 4k or so enough for a small
sample?)
4,5 -neat LEDs (scrapped, kept everything neon)
6 -HV modulation (unused currently)
Inputs - Port A
0,1 - Hour +/-
2,3 - Minute +/-
4 - Second Reset
All inputs are active low and are connected to momentary switches
(DPST); No hardware
debounce. 
DC Power supply
All three boards are driven from the same low-voltage DC power
supply. The 120VAC input goes through an IEC
connector/filter to a fuse holder and SPST switch. From there, it
enters a 10VAC transformer (sized for 2 amps) and then a bridge
rectifier. The ripply DC is filtered with a large cap and
then made available on solder lugs. This raw ~10VDC goes to
the HV board and to the two logic boards through a standard 7805 for
the digital circuits.
What
I learned
- Check each digit on your tubes when you buy them. One of my
tubes had two digits sort of twisted around each other -- hard to see
without careful inspection.
- Don't use a similar looking probe for your oscilloscope and
DVM. I was using the DVM to test current on each tube, and then
the computer stopped responding -- I thought I had crashed the
computer. I picked up what I
thought was the osc probe to check the activity on the address bus, and
spark! 170v! Toasted almost everything on the 6502
board, including the decoupling caps. Crap.
- Be very organized with your digit wiring; use lots of cable ties
or
something. 6 digits is 120 solder joints on 60 wires. Argh.
- Don't be afraid to make your own Nixie sockets.
I
stood my tubes up on my flatbed scanner, arranged them with a ruler and
then scanned. Imported to Photoshop, did a levels to make
the pins contrasty and printed the output 1:1. Glued the
paper onto my plexi, drilled all the holes, dropped in pin-sockets w/
CA glue and bam! Instant Nixie Tube Clock Socket!
- A 35mA draw on a 170v switchmode power supply makes quite a
big
magnetic field; enough to crash the computer. Use short
wires and shield the inductor.
- The DS1742 is very picky about timing. Set the read
bit
and then wait quite a long time before really trying to get data from
the clock registers. If you don't wait, you always get 0s -- not
garbage like the data sheet implies.
- In tasm, ROR does not imply ROR the accumulator like it did in
the old
days. I think it was doing a ROR $0 (zero page) instead, which is
stupid. You'd never do that. Just "ROR" in the
C64/Apple II
days meant ROR the accumulator, but in tasm, you must say ROR A.
(I think this also goes for LSR). Until I figured this out
I was pulling my hair out since my code seemed fine.
- Those sexy 0.1uF polarized tantulum decoupling caps that people
like will blow if you look at them wrong. Something is to
be said for just using ceramic disk caps, but the PCBs weren't designed
for that.
Schematics


Thanks to everyone on Neonixie Yahoo!
group and 6502.org! Awesome people! - Ryan
K. Brooks