Program Interface Arduino MM5451 LED Display Driver
The subject here is connecting the Arduino to a MM5451 LED display driver. This is written in C to demonstrate bitwise programming and shift register operation.
Using only two input pins (clock and data) for serial date input produces 35 open drain outputs. The 35 outputs are 15mA sink.
Internal current generator eliminates need for external resistors and has continuous brightness control. Wide supply voltage up to 13.2V - inputs TTL level.
A single pin controls the LED display brightness by setting a reference current through a variable resistor connected to VDD or to a separate supply of 13.2V maximum.
The M5451 are specially designed to operate 4 or 5-digit alphanumeric displays with minimal interface with the display and the data source. Serial data transfer from the data source to the display driver is accomplished with 2 signals, serial data and clock.
Using a format of a leading "1" followed by the 35 data bits allows data transfer without an additional load signal. The 35 data bits are latched after the 36th bit is complete, thus providing non-multiplexed, direct drive to the display.
Note: these are open drain outputs that switch to ground when the associated bit is HIGH. Outputs change only if the serial data bits differ from the previous time.
Display brightness is determined by control of the output current LED displays. A 0.001uF capacitor should be connected to brightness control, pin 19, to prevent possible oscillations.
Connecting to Arduino
Fig. 1 shows the two connections to Arduino. MM5451 pins 11-18 (Bits 0-7) are connected to a LN516YA common-anode display (schematic). Bit 1 is segment a. 8-LEDs are connected to pins 3-10 - all anodes go to Vcc of 5V. Note no current limiting resistors are required.
Segment code for the LN516YA is stored in array segCode where segCode displays 0, etc. There are two serial shift routines ssrWriteMSB(value) and ssrWriteLSB(value) used based on the viewing angle of the LEDs. Note routines zeroWrite() and pulseCLK().
Within the "for" loop the sequence starts by placing a HIGH (1) in the data pin then sending a clock pulse. Next myCount using a modulus function with 10 is shifted out to the MM5551 then the binary count itself is shift out.
That is only 16-bits but we must have 36 clock cycles before the data will be latched to the 35 output pins. (Bit 36 is not output!) Routine zeroWrite(21) takes care the remaining bits need (I set this to 0s) to enable the internal latch function.
The value of 21 used here is based on 36 - 16 bits used which is 20: the Python for loop counts from zero so it's 20 + 1. This value changes based on bits shifted in.
As the program runs we get a binary count on the LEDs and 0-9 on the display.
Download Arduino code mm5451.txt. Copy and paste to Arduino compiler.
- Connect-Program Arduino and a MM5451 LED Display Driver
- Arduino and a MM5451 LED Display Driver YouTube
- Connect-Program Raspberry Pi and a MM5451 LED Display Driver
- Raspberry Pi and a MM5451 LED Display Driver YouTube
Hall Effect Sensors
This included updating the original webpage with expanded material and a new video covering additional circuits.
Constant Current Source Tutorials
Each includes webpage and YouTube video. First we cover general constant current source (CCS) circuits ending with the LM334. The using resistive sensors with the LM334. The for higher power CCS for driving LEDs or trickle charge batteries we turn to the higher power LM317.
- Quick navigation main page:
- Arduino Microcontroller Projects
- General Electronics Learning and Projects
- Raspberry Pi and Linux
- Connecting a PC Printer Port to Electronics with Python
- Microchip PIC 18F2550
- PICAXE Microcontroller
- Gen. Electronics
- My YouTube Channel
- Raspberry Pi & Linux
- Arduino Projects
- PIC18F2550 in C++
- PIC16F628A in Assembly
- PICAXE Projects
- Web Master
- Bristol VA/TN
- US Constitution
- Religious Themes 1
- Religious Themes 2