char TestNumber1 = "3.14159263";
//* main - main function
// Configure USART for 40 MHz,
// 9600 Baud, 8-Bits, No parity,
printf("\r\n VEX MAX7219 LED
// Setup the timers used for delays.
// Initialize the MAX7219 Numeric LED
// Display Driver
// Display the value of PI
// Display digitis from 0 to 99999 on the
// Numeric LED Display using the MAX7219
for (i=0; i<99999; i++)
// Convert the integer i to an ASCII
// Display the string on the Numeric LED
// Display using the MAX7219.
// Wait 10 milliseconds
“#include max7219.h” to your VEX C programs and
max7219.c to your MPLAB project files. Feel free to use the
code and modify it as you see fit.
Programming the VEX Controller
It’s time to download the max7219.hex application into
the VEX controller and run it. Start by copying the led.hex
file to your laptop or PC hard disk and place it in a folder.
Program the VEX microcontroller’s Flash by running the IFI
Bootloader (also available from the IFI site) and then browse
to the directory you created for the max7219.hex file. Once
TABLE 2. Bill of Materials (BOM) for the
Numeric LED Display Board.
1 1-2 MAX7219 Numeric LED Driver IC
2 1 Prototype Breadboard
3 1-10 Common Cathode Numeric LEDs
4 1 VEX Microcontroller IFI
6 1-2 .1 µF Capacitors RadioShack
7 100 .100 Pin Headers (optional) Digi-Key
8 1 Wire-wrap Wire (optional) RadioShack
9 1 Wire-wrap Tool (optional) RadioShack
TABLE 2. The total quantities of each component depend
on how many MAX7219 ICs are used (one or two). If you
plan to use point-to-point construction, then there is no
need to purchase the wire-wrap materials.
the max7219.hex file has been downloaded successfully, the
display should show the value 31415.
If the display does not work correctly the first time you
power it up, don’t panic. It could just be a or loose wire or
even a bad electronic component. What you need to do is
double-check all the wiring against the schematic with the
circuit disconnected from the power supply. Check the + 5
volts and Ground connections, and also the Vdd, Vcc, and
Vss and GND pins of each IC to make sure the power supply
wiring is correct.
Applications for the Numeric LED Display
There are many VEX related uses for numeric LED
displays including digital displays for timers, clocks,
thermometers, speedometers, FRC field scoring displays, and
battery voltage displays. When integrated with a keypad,
they can be used for combination locks, calculators, and
motor controllers. You can also use the MAX7219 for
driving up to 64 LEDs which can be attached to robots and
props to brighten them up while using less power.
The Fun Starts Here
Now that you have some preliminary information under
your belt with some exposure to VEX, its logic subsystem,
and the various internal and external electronic components
(including the MAX7219 IC and the numeric LED display),
you can begin to integrate discrete LED and numeric LED
displays into your own VEX projects.
If you come up with a really cool application, be sure to
let SERVO know. SV
SERVO 05.2010 71