LPLC – Driving a MAX7219 7-segment LED display

$_12

 

Click here for Youtube video  demonstrating the features of the display.

Whist it is possible to connect a multi-digit 7-segment LED display directly to an LPLC module, it can very quickly get messy and complicated. If the display has more than 2 digits, it will need to be multiplexed, which means high-current digit drivers and a software interrupt routine.

By far the simplest and cheapest method is to use a ready made LED module which contains the display and a MAX7219 driver IC all on a small PCB. These are available on EBay for around £2.50, including Postage and Packaging from Hong Kong or China.

These have a serial SPI interface which can easily be driven from a microprocessor. The only complication is that the LED module needs a 5 volt power supply, but the LPLC requires 3.3 volts, so a simple voltage regulator may be needed. The LPLC seems to drive the three MAX7219 data lines OK from its 3.3 volts, without the need for buffer amplifiers.

The source code of the demo program can be downloaded from here : MAX7219.X

The pin connections are defined in file MAX7219.h as follows, but can be changed to anything convenient:

  • Display DIN  = PORT B0 (LPLC Pin 21)
  • Display LOAD/CS  = PORT B1 (LPLC Pin 22)
  • Display CLK  = PORT B2 (LPLC Pin 23)

All the code to control the display module is contained in the template file MAX7219.c .  Have a look at Main.c for sample code showing how to use it, and see the Youtube video to see it running.

Have fun!
Gary G0HJQ

 

 

 

 

 

Submit a Comment

Your email address will not be published. Required fields are marked *