Seven Segment Clock with a AtMega328p

In early 2017, I developed some interest in seven segment displays, and in how to drive them. Because of the large wealth of information surrounding the Arduino IDE on the internet, finding a program that could drive such a display proved to be a relatively easy task. Before long, on my breadboard I had a clock running using a four digit seven segment display. This was done using just one chip: the AtMega328p. To run a four digit seven segment display such as the one I have, a technique called multiplexing has to be used in order to control all of the display inputs, without an equal amount of microprocessor outputs. The code can be found here.


Prior to this point, I had only a little experience with the PCB design software Eagle, I had designed and etched a couple simple boards based on the MC34063 switching regulator and a battery charger IC. Based on a recommendation from a friend, and also because the free version of Eagle is limited, I decided to try Kicad. To familiarize myself with it, I decided I’d design and etch a board for my seven segment display clock project. The process, once you’ve had a bit of practice and refined your technique can be quite quick. I also much prefer it to using per-board, although there are advantages to perf-board at times. The basic process I used is detailed here in this video.


The final project turned out pretty well. Although there is no RTC (real time clock) the accuracy is pretty good, and doesn’t seem to really stray significantly. There is also a button which will demonstrate the multiplexing function by slowing it down, and gradually speeding it up until it reaches maximum speed. In person the display looks a bit nicer, but a screen cover to diminish the bleeding effect of the segments into those that are unlit might help a little. It was a fun project, and I recommend if you are interested in these displays to try it out!