In recent years, the single-chip microcomputer system has gradually penetrated into the practical engineering applications of various industries with its advantages of small size, powerful functions, flexible expansion and easy use. The LED display circuit is like the eyes of the single-chip microcomputer system, which transmits various status information and processing results of the system to people in real time. Therefore, an efficient and convenient LED display driver circuit is an indispensable element for a complete single-chip microcomputer system. Commonly used LED display driver circuits include parallel decoding mode, serial-parallel conversion mode, display driver interface chip mode, etc. The following discusses these methods respectively and gives application examples of the display driver chip MAX7219.
Parallel decoding Display Mode
Figure 1 is an example of the output display of the single-chip microcomputer 89C2051. The 4-bit BCD code data is output in parallel from its P1.0~P1.3, and is decoded by the 7-segment LED display driver circuit CD4511 to drive the LED display. In this way, you only need to write the BCD code of the number to be displayed to P1.0~P1.3 to display the corresponding number. Although this method is simple, it occupies more single-chip microcomputer port lines and has low resource utilization, so it is not often used.
Figure 1 Parallel decoding display mode
Serial-parallel conversion method
Figure 2 shows the circuit of the serial port driving digital tube of 89C2051, where the serial port works in mode 0, and 74LS164 is an 8-bit serial input and parallel output shift register, which is responsible for converting the serial data output by RXD into parallel signals. Obviously, this method greatly reduces the number of microcontroller lines used to display the same number of bits, and can allow the LED to display characters other than BCD codes (such as A, B, C, D, etc.). However, when there are more bits to be displayed, more lines are still required, and in many cases the serial port needs to work in UART mode for serial communication , which limits the scope of use of this method.
Figure 2 Parallel decoding display mode
LED display driver chip
With the development of single-chip microcomputer technology, many companies have launched dedicated LED display driver chips, such as A Y0438 from Microchip and MAX7219 from Maxim, which are typical representatives. The following uses MAX7219 as an example to illustrate the application of LED display driver chips in single-chip microcomputer systems.
Introduction to the MAX7219
MAX7219 is an 8-bit LED serial display driver launched by Maxim . It uses a 3-wire serial port to transmit data, occupies less resources and has simple hardware. Only one external resistor is needed to easily adjust the brightness of the LED . The number of displays can be flexibly selected (1 to 8, which can be multiplied by cascading). It can be displayed with or without decoding. It contains hardware dynamic scanning control and can set a low-power shutdown mode.
Pin Function and Working Principle
MAX7219 adopts 24-pin dual in-line package, and its pinout is shown in Figure 3. SEGA~SEGG and DP are the LED seven-segment driver lines and decimal point line, respectively, supplying the display source current; DIG0~DIG7 are 8-bit digital driver lines, outputting bit selection signals, and absorbing current from the common cathode of each LED.
Figure 3 MAX7219 pin functions
DIN is the serial data input terminal. On the rising edge of CLK, one bit of data is loaded into the internal 16-bit shift register. The maximum frequency of CLK can reach 10MHz. On each rising edge of the input clock , one bit of data is shifted from the DIN terminal to the internal register; LOAD is used to load data. On the rising edge of LOAD, 16 bits of serial data are latched into the data or control register. LOAD must go high at the same time or after the 16th clock rising edge and before the next clock rising edge, otherwise the data will be lost. Each set of data is a 16-bit binary data packet, and its format is shown in Table 1.
Among them, D15~D12 bits are not used, D11~D8 bits are the addresses of the internal 5 control registers and 8 LED display data registers, and D7~D0 bits are the data to be displayed by the 5 control registers and 8 LED digital tubes. Because the control registers and display data registers are independently addressed, each register can be operated through the program. In general, the program sends the control command first, and then sends the data to the display register. Each 16 bits is a group, starting from the highest bit of the high address byte to the last bit of the low data byte. There are 14 addressable control word registers inside the MAX7219. The functions and addresses of each register are shown in Table 2.
Among them, address ×0H is a no-operation register, which allows data to pass directly from input to output and can be used for device serial connection. Address ×1H~×8H is the display RAM area, which corresponds to the 8-bit LED display data of DIG0~DIG7 pins respectively. Address ×9H is the decoding mode register, and its 8-bit binary number controls the decoding mode of 8 LED displays respectively. When the logic level is high, hardware decoding (BCD-B code decoding) is selected. The decoder selects the lower 4 bits (D3~D0) in the data register for BCD-B code decoding. ×0H~×9H correspond to BCD code characters 0~9, and ×AH~×FH correspond to B code characters -, E, H, L, P and blanking respectively. D4~D6 are invalid, and D7 controls the decimal point alone; when the decoding mode register is at a logic low level, software decoding is selected, and data D6~D0 correspond to the A~G segments of the LED display respectively, and D7 corresponds to the decimal point DP.
Address ×AH is the display brightness register. By writing different values to the D0~D3 bits of this register, the LED display brightness can be controlled. There are 16 levels of adjustment from 00H to 0FH. Address ×BH is the scan limit register. The values of its D0~D3 bits are set to 00H~07H, indicating that the number of dynamic scans of the display is 1~8. Address ×CH is the shutdown register. When its D0 bit is 0, the MAX7219 is in the shutdown state, the scanning oscillator stops, all displays are blanked, and the register data remains unchanged; when D0 is 1, it works normally. Address ×FH is the display test register. When its D0 bit is 0, it works normally; when D0 is 1, it is in the test state, and all fields of all LED displays are turned on and displayed at maximum brightness.
Application Examples
Figure 4 is an example of the digit LED display circuit of MAX7219. In Figure 4, P1.0 and P1.1 of the microcontroller 89C2051 are connected to the serial data input terminal DIN and the clock signal CLK of the MAX7219 respectively, and P1.2 is used as the LOAD signal. The resistor R is selected according to different LEDs, ranging from 7KΩ to 60KΩ.
Figure 4 MAX7219 application circuit
Conclusion
Through the above comparison, the parallel decoding circuit is the simplest, but the resource utilization rate is low, so it is not commonly used. The serial-parallel conversion method has a strong advantage in the application of small systems, but with the development of single-chip microcomputer application systems, many complex systems have adopted dedicated display driver chips. From the above application examples, it can be seen that after using MAX7219, the system hardware structure is simple, the program flow is clear, and the control is flexible and convenient. It is applied to instruments, medical equipment , and smart home appliances . It can save a lot of latches, decoders and drivers, greatly improving the integration of the display part. Therefore, this display drive method has broad application prospects in single-chip microcomputer system design.
Previous article:LED main parameters and electrical, optical and thermal characteristics
Next article:Design selection and construction considerations for full-color LED display screens
- MathWorks and NXP Collaborate to Launch Model-Based Design Toolbox for Battery Management Systems
- STMicroelectronics' advanced galvanically isolated gate driver STGAP3S provides flexible protection for IGBTs and SiC MOSFETs
- New diaphragm-free solid-state lithium battery technology is launched: the distance between the positive and negative electrodes is less than 0.000001 meters
- [“Source” Observe the Autumn Series] Application and testing of the next generation of semiconductor gallium oxide device photodetectors
- 采用自主设计封装,绝缘电阻显著提高!ROHM开发出更高电压xEV系统的SiC肖特基势垒二极管
- Will GaN replace SiC? PI's disruptive 1700V InnoMux2 is here to demonstrate
- From Isolation to the Third and a Half Generation: Understanding Naxinwei's Gate Driver IC in One Article
- The appeal of 48 V technology: importance, benefits and key factors in system-level applications
- Important breakthrough in recycling of used lithium-ion batteries
- Innolux's intelligent steer-by-wire solution makes cars smarter and safer
- 8051 MCU - Parity Check
- How to efficiently balance the sensitivity of tactile sensing interfaces
- What should I do if the servo motor shakes? What causes the servo motor to shake quickly?
- 【Brushless Motor】Analysis of three-phase BLDC motor and sharing of two popular development boards
- Midea Industrial Technology's subsidiaries Clou Electronics and Hekang New Energy jointly appeared at the Munich Battery Energy Storage Exhibition and Solar Energy Exhibition
- Guoxin Sichen | Application of ferroelectric memory PB85RS2MC in power battery management, with a capacity of 2M
- Analysis of common faults of frequency converter
- In a head-on competition with Qualcomm, what kind of cockpit products has Intel come up with?
- Dalian Rongke's all-vanadium liquid flow battery energy storage equipment industrialization project has entered the sprint stage before production
- Allegro MicroSystems Introduces Advanced Magnetic and Inductive Position Sensing Solutions at Electronica 2024
- Car key in the left hand, liveness detection radar in the right hand, UWB is imperative for cars!
- After a decade of rapid development, domestic CIS has entered the market
- Aegis Dagger Battery + Thor EM-i Super Hybrid, Geely New Energy has thrown out two "king bombs"
- A brief discussion on functional safety - fault, error, and failure
- In the smart car 2.0 cycle, these core industry chains are facing major opportunities!
- The United States and Japan are developing new batteries. CATL faces challenges? How should China's new energy battery industry respond?
- Murata launches high-precision 6-axis inertial sensor for automobiles
- Ford patents pre-charge alarm to help save costs and respond to emergencies
- New real-time microcontroller system from Texas Instruments enables smarter processing in automotive and industrial applications
- How to reduce the cost of Bluetooth
- Why can elderly devices costing only a few hundred yuan measure body temperature, but smart phones costing thousands of yuan cannot?
- [Silicon Labs BG22-EK4108A Bluetooth Development Evaluation] Part 2: Understanding the Reading and Writing of Bluetooth BLE LED Light Services
- About the problem of HAL library external interrupt entering interrupt service twice
- BLDC Tester
- Prize-winning live broadcast: Melexis consumer-grade ultra-low power position sensor, simplifying design and reducing costs. Registration is now open!
- ESP32-S2-Saola-1 Development Board Circuit Analysis
- [Repost] Adafruit Blog: New PyBoard at FOSDEM
- Wireless connectivity technology promotes intelligent control of lighting systems
- SinlinxA33 development board Linux kernel atomic operations (with measured code)