
Fig. 1
Connect-Program Raspberry Pi MM5451 LED Display Driver
Raspberry Pi and a MM5451 LED Display Driver on YouTube
The subject here is connecting the Raspberry Pi to a MM5451 LED display driver. This is written in Python 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. The MM5451 comes in a 40 pin DIP package as used here.
Internal current generator eliminates need for external resistors and has continuous brightness control. Wide supply voltage up to 13.2V - inputs TTL level.
See:
MM5452 pin connections.
MM5451 block diagram.
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(s).
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 Raspberry Pi
Fig. 1 shows the two connections to Raspberry Pi. 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[0] 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.
The Python code is rpi_MM5451.txt.
- Quick navigation of this website:
- Basic Electronics Learning and Projects
- Basic Solid State Component Projects
- Arduino Microcontroller Projects
- Raspberry Pi Electronics, Programming
- Electronics hacks:
- Connecting PCF8574P GPIO Expander to Raspberry Pi
- Programming PCF8574P 8-bit I-O Expander with Arduino
- Connect-Program Raspberry Pi and a MM5451 LED Display Driver
- Raspberry Pi Python RTC with MAX7219 Display Driver
- Raspberry Pi and the 8-Digit LED MAX7219 Display Driver
- Programming Raspberry Pi and the 74HC595 Serial Shift Register
- Interface I2C LCD to Raspberry Pi in C
- ADS1115 4-Channel ADC Uses I2C with Raspberry Pi
- MCP4725 12-Bit DAC Interface to Raspberry Pi
- WiringPi and Pulse-Width-Modulation with Raspberry Pi
- WiringPi for Raspberry Pi and MAX6675 thermal-couple sensor
- WiringPi Blink an LED Demo
- Simple GPIO Reference Box
- Raspberry Pi with PCF8591 Analog To Digital Control in C
- Raspberry Pi PCF8591 AD-DA Sensor Python Interface
- Digital Circuits:
- Simple Schmitt Trigger SN74HC14 Square Wave Generator
- Introduction to RC Differentiator Circuits and Uses
- SN74HC14 Square Wave Generator uses SN7476 JK Flip-Flop
- Three Output Pulse Generator Circuit for Digital Circuits
- Astable CD4047 Geiger Counter Power Supply
- CD4047 Monostable Multivibrator Circuit
- Basic TTL Tri-State Buffer Circuit Examples
- Tutorial NOR Gate SR Latch Circuits
- Tutorial NAND Gate SR Latch Circuit
- Tutorial OR-NOR Circuits Including Monostable Multivibrator
- Brief Tutorial of XOR and XNOR Logic Gates
- LM555-NE555 One-Shot Multivibrator AC Power Control
- Arduino
- Arduino PWM to Analog Conversion
- Arduino Analog Digital Conversion Voltmeter
- Better Arduino Rotary Encoder Sensor
- Simple 3-Wire MAX6675 Thermocouple ADC Arduino Interface
- Hall Effect Magnetic Switches and Sensors
- Basic Hall Effect Sensors YouTube
- Opto-Isolated Transistor Drivers for Micro-Controllers
- Opto-Couplers Theory and Circuits YouTube
- H-Bridge Motor Control with Power MOSFETs Updated
- Build Power MOSFET H-Bridge for Arduino YouTube
- LM317 High Power Constant Current Source Circuit
- Adjustable LM317 High Power Current Source
- ULN2003A Darlington Transistor Array with Circuit Examples
- ULN2003A Transistor Array with Arduino
- Constant Current Circuits with the LM334, LM317
- Constant Current Source Tutorial YouTube
- N-Channel Power MOSFET Switching Tutorial
- P-Channel Power MOSFET Switch Tutorial
- Using Power MOSFETs with Arduino YouTube
- Zero-Crossing Detectors Circuits and Applications
- Zero-Crossing Circuits for AC Power Control
- In Depth Look at AC Power Control with Arduino
- Micro-controller AC Power Control Using Interrupts
- YouTube Video for Arduino AC Power Control
- All NPN Transistor H-Bridge Motor Control
- All NPN Transistor H-Bridge Motor Control YouTube
Web site Copyright Lewis Loflin, All rights reserved.
If using this material on another site, please provide a link back to my site.