The circuit involves the usual minimum components (crystal oscillator and 5V power supply) to enable the operation of the PIC microcontroller with the addition of a series of MAX7221 LED drivers connected via a SPI 3-wire interface, and in turn each MAX7221 connected to a 8 x 8 LED matrix.
A typical "wall-wart" power-supply is used (a surplus telephone charger in this case) in conjunction with a voltage regulator (LM7805) to provide the regulated 5V required by the PIC microcontroller.
The schematic diagram shows the PIC microcontroller interfaced with two MAX7221 LED drivers, each of which is connected to a 8 x 8 LED matrix. The actual physically constructed circuit consists of five MAX7221 drivers and associated LED matrices. Each additional MAX7221 is daisy chained analogous to the connection of U2 (and Z2) in the schematic diagram presented.
The LM7805 provides the 5V circuit voltage, in this case, stepping down from the 12V input from a "wall-wart" power-supply.
The crystal X1 and associated capacitors C1 and C2 provide the oscillator for the PIC16F876A microcontroller. Incircuit serial programming (ICSP) of the PIC16F876A microcontroller is provided via connector J1 with switch SW1, resistor R1 and diode D2 providing voltage protecting during loading code into the PIC microcontroller.
Control signals from the PIC16F876A microcontroller are sent from port C (pins 12, 14 and 16) to the MAX7221 LED driver using SPI protocol. Via the SPI interface, the PIC16F876A can send the necessary commands to instruct which LED's are to be enabled by the MAX7221 (described in the Testing/Experimental Results Section).
The MAX7221 has the necessary internal circuity to enable driving individual LED's, multiplex scan circuitry, segment and digit drivers, and an 8x8 static RAM to store data.
R2 sets the peak current on display LED's controlled by the MAX7221 as 100 times the current entering the ISET of the MAX7221 (pin 18). The datasheet recommends 9.53ohm, which then typically sets the LED current at 40mA. While R2 could be replaced with a potentiometer to enable brightness adjustment, LED intensity can also be controlled digitially via SPI/commands. The digital option for controlling LED intensity was adopted in this case.
Decoupling capacitors C5 and C6 as close to the MAX7221 as possible were required on the large DIY 8x36inch display to stop 'glitching' as the power supply lines are long in this case. As recommended by the datasheet a 10uF electrolytic and a 0.1uF ceramic capacitor were used.
Note both GND pins (4 and 9) of the MAX7221 must be connected to ground.
DIY Matrix Display
The matrix displays (refer to layout diagram at the end of the Printed Circuit Board Section) show how individual LEDs are connected with common anodes/cathodes in a rows by columns type arrangement. This means in order to turn on individual LED's, each row is scanned sequentially (i.e., the 'row' anode connected to Vdd) and the 'column' cathodes of desired LED's connected to ground. The MAX7221 handles the necessary multiplexing, which by the datasheet is typically 800Hz.
The PIC16F876A interfaces via SPI and therefore requires firmware to handle the data transfer and provide the logic/data to enable the desired display functionality.
SPI 'bit-banging' routines are described in the Testing/Experimental Results Section, together with example code that enables animated text scrolling on the large (8x36 inch) DIY 320 LED display. See the Video Section for examples of the display in operation.