Close

ATMega328 SPI display controller

A project log for Raspberry Pi Zero Nixie Clock

4 Digit Nixie Clock driven by Raspberry Pi Zero and Arduinix board.

Nick SayerNick Sayer 03/10/2017 at 22:040 Comments

I haven't actually tried any of this yet, but I've got a rough cut of the code for an ATMega328P acting as a dedicated SPI slave display controller.

The wiring:

PB3-PB5 are used as both the ISP interface to program the chip and the SPI slave interface. In principle, this means that the same 3 wire connections (plus holding !RESET low) could be used to update the flash from the Pi.

For vocabulary, I use "element" as the name for an individual tube and "digit" as the 0-9 (plus decimal point) digit line.

PD0-7 are digit lines 0-7.

PB0-PB1 are digit lines 8 and 9.

PB2 is the digit line for the decimal point.

PB6-PB7 are the element select lines 0-1

PC0-PC5 are the element select lines 2-7.

What's left on the DIP variant of the ATMega328P are the !RESET, two Vcc and two GND and AREF (which can be left NC).

I'm going to upload preliminary (untested) code for the chip to the files.

You'll want to set the LFUSE to 0xe2. That will set the clock speed to 8 MHz from the internal oscillator. The minimum Vcc voltage is 2.7V at that speed.

Discussions