Dual 4-digit seven segment LED display with SPI interface using PIC12F
This project is an extension of my previous MAX7219 based SPI seven segment LED display module. The new display features eight 7-segment displays arranged in two rows of four digits. The on-board MAX7219 driver enables you to easily add eight 7-segment LED displays to your project using only 3 I/O pins of microcontroller. The major advantage of using this board is the time-division multiplexing operations required for continuous refreshing of the display digits are performed by the MAX7219 chip, thereby keeping the microcontroller free for doing other pressing tasks. It is suitable for displaying two variable values simultaneously in a project, such as displaying temperature and humidity, or current and voltage, etc.
- based on MAX7219 display driver
- SPI interface (3 pins)
- operates at +5V supply
- individual control of all digits and decimal points
- display brightness control through software
- dimensions 1.95″ x 1.95″ (50mm x 50mm)
- two 0.36″ 4-digit seven segment LED display
The circuit diagram of this project is very simple (shown below) and derived from the datasheet of the MAX7219.
In the above board, digits from right to left in the first row are DIG0 through DIG3, whereas in the second row, the digits from right to left are DIG4-DIG7. The following example code is written in C and compiled with mikroC Pro for PIC compiler to illustrate how to interface this display module with the PIC12F project board. The program is for a dual 4-digit decimal counter. The first row of the display will be an up counter counting from 0000 to 9999 with one second duration. Meanwhile, the second row will count in reverse order from 9999 to 0000. The microcontroller used in the PIC12F board is PIC12F683. The details of MAX7219 registers and their initialization is described in my previous article Serial 4-digit seven segment display module.