Analysis of LED display drive circuit in single chip computer system

Publisher:敬亭山人Latest update time:2011-05-06 Source: EDN Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

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.

Reference address:Analysis of LED display drive circuit in single chip computer system

Previous article:LED main parameters and electrical, optical and thermal characteristics
Next article:Design selection and construction considerations for full-color LED display screens

Latest Power Management Articles
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号