Interface technology between LED light bar display and PLC

Publisher:平和的心态Latest update time:2011-06-25 Source: 中国LED网Keywords:LED Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

PLC not only has the control functions of traditional relay control systems, but also can expand input and output modules, especially some intelligent control modules, to form different control systems, integrate analog input and output control with modern control methods, and realize intelligent control, closed-loop control, and comprehensive control with multiple control functions. Modern PLC is widely welcomed for its high integration, strong functions, strong anti-interference ability, flexible configuration, and stable operation, and plays an increasingly important role in the modernization of traditional industries. However, the control system display interface designed by PLC is relatively monotonous. Generally, the status of the controller is understood by observing the indicator light set on the control cabinet or the LED light of the PLC itself. For instruments such as liquid level acquisition and control, this display interface is far from enough. In order to make up for the shortcomings of the PLC display interface, LED light column display or PC display can be used. This paper proposes an interface technology between LED light column display and PLC based on MAX7219.

1 Introduction to LED Bargraph Display

LED light column display is composed of several LED tube cores arranged at equal distances according to the specified length. It has the characteristics of eye-catching, intuitive display, uniform brightness, high reliability, low cost, vibration resistance, impact resistance, small size, light weight and continuous display of industrial parameter change trends. It has been used in various display and adjustment instruments as an analog indication of process quantity or control quantity and valve position. LED light column display has different colors such as red, green, orange, and yellow, and there are two types: common cathode and common anode. According to the number of light-emitting diodes contained, there are 101 lines (or 100 lines), 64 lines, 51 lines and other specifications. One of the LEDs (for 101 lines, 51 lines and other products) is generally used for power indication, and can also be used for other purposes or not used, while the other LEDs are generally composed of ×8 or ×10 structures, using row and column scanning to save resources. For example, 100 lines have 10×10 structures and 8×13 structures, and 64 lines have 8×8 structures. This article uses a 64-line common cathode LED light column display.

2 MAX7219 Pin and Function Description

MAX7219 is a serial input/output common cathode digital tube display driver chip produced by MAXIM. One MAX7219 can drive 8 7-segment (8 segments including decimal point) digital LEDs or 64-line LED light column displays. The chip has a three-wire serial interface with a 10 MHz transmission rate and can be connected to any microprocessor. Only one external resistor is needed to set the segment current of all LEDs. Its operation is very simple. The PLC can write the relevant instructions into the internal instruction and data registers of MAX7219 through three output ports. At the same time, it also allows users to select multiple decoding methods and decoding bits. In addition, it also supports multiple MAX7219 chips in series, so that the PLC can control more LED displays through 3 lines (i.e. serial data line, serial clock line and chip selection line).

The pin arrangement of MAX7219 is shown in Figure 1. Among them, SEG A~SEG G and SEG DP are the seven-segment driver lines and decimal point driver of LED digital tubes, respectively, supplying current to the display. When used to drive LED light column display, they provide driving current for 8 light-emitting diodes in each segment; DIG0~DIG7 are the 8-segment driver line inputs of 8-bit digital or light column display, which absorb current from the common cathode display. ISET is the current adjustment terminal, which is connected to the power supply through a resistor to adjust the maximum segment current to change the LED display brightness. DIN is the serial data input terminal, and DOUT is the serial data output terminal. The data input to DIN is sent to the DOUT terminal after 16.5 clock cycles so that it can be transmitted to the next MAX7219 when cascaded. The maximum frequency of CLK can reach 10 MHz. At each rising edge of the input clock, one bit of data is shifted from the DIN terminal to the internal register. The strobe terminal LOAD is used to load data. At the rising edge of LOAD, 16 bits of serial data are latched into the data or control register. LOAD must become high at 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 and can be any value, usually all 1. D11~D8 bits are the addresses of the internal 5 control registers and 8 LED display data registers, and D7~D0 bits are the command words of the control register or the data to be displayed by the 8 LED digital tubes. Because the control register and the display data register 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 as a group, starting from the highest bit of the high address byte, until the last bit of the low data byte. There are 14 addressable control registers and data registers inside the MAX7219. The functions and addresses of each register are shown in Table 2.
Among them, address F0H is a no-operation register, which allows data to pass directly from input to output and can be used for device serial connection. Addresses F1H to F8H are display RAM areas, corresponding to the 8-segment LED display data of DIG0 to DIG7 pins respectively.
Address F9H is the decoding control register. The decoding mode register can set each data bit to be B code decoding mode or non-decoding mode. Each bit in the register corresponds to a data bit. When it is "1", select B decoding mode, and when it is "0", select non-decoding mode. When used to drive the LED light column display, it should be set to non-decoding mode. At this time, data D7~D0 correspond to each segment of the light column display VD8~VD1 light-emitting diodes. Address FAH is the display brightness register. By writing different values ​​to the D3~D0 bits of the register, the LED display brightness can be controlled (D7~D4 is not used and can be any value). There are 16 levels of adjustment from ×0H to ×FH. The larger the value of D3~D0, the brighter the LED display. In the analog control mode, adjusting the resistance value of the external resistor Rset between V+ and ISET terminals can control the size of the LED segment current, so as to achieve the purpose of hardware brightness adjustment.
Address FBH is the scan segment number register, and its D3~D0 bit values ​​are set to 00H~07H (D7~D4 are not used and can be any value), indicating that the number of dynamic scan segments of the display is 1~8.
Address FCH is the standby mode control register. When its D0 bit is 0 (D7~D1 are not used and can be any value), MAX7219 is in shutdown state, the scanning oscillator stops, all displays are blanked, and the register data remains unchanged; when D0 is 1, it works normally. Address FFH is the display test register. When its D0 bit is 0 (D7~D1 are not used and can be any value), it works normally; when D0 is 1, it is in test state, and all fields of all LED displays are turned on and displayed at maximum brightness.
3 Hardware Composition
Taking the relay output type of Mitsubishi's small PLC series as an example, the interface circuit between the LED light column display and the PLC is shown in Figure 1. The 64-line light column display forms an 8×8 structure and is driven by a MAX7219. Because the PLC output module has the function of isolating the internal circuit of the PLC from the external actuator, the Y0, Y1, and Y2 output points of the PLC are used as the input terminals of the clock pulse, loading data, and serial data of the MAX7219 after level conversion, and connected to the CLK, LOAD, and DIN pins of the MAX7219; the SEG A~SEG F and SEGDP terminals of the MAX7219 are respectively connected to the anodes of the VD1~VD8 light-emitting diodes corresponding to each segment of the LED light column display, and DIG0~7 are respectively connected to the common cathodes of each segment of the light column display to realize segment selection. The resistor Rset value is used to adjust the brightness of the LED, and the minimum value of Rset is 9.53 kΩ.
4 Driver Design
4.1 Initialization
MAX7219 automatically scans and displays the number of LED lines in the manner specified by the five control registers, so the five control registers must be initialized before the display program. The reference settings are shown in Table 3.
4.2 Software Design
In PLC, 16-bit data registers can be used to store 16-bit binary data packets, where the high-order byte stores the address byte and the low-order byte stores the low-order command or displayed number. For example, we can establish an LED display buffer in the data storage area of ​​the PLC, with the first address of the display buffer being D0 and the last address being D7, which correspond to the segment code and bit address of each display segment respectively, and use the program to control the data to be sent serially in the form of 16-bit data packets. Assuming that the PLC reads the status information of the industrial site through the input module, and through the calculation and operation of the user program, when the LED light column display is to have 46 lines lit, the data format of its display area is shown in Table 4.
The control register and display register of MAX7219 are independently addressed. The display program is actually the process of PLC continuously writing 16-bit binary data packets to the corresponding control register and data display register of MAX7219 through Y2 (DIN) under the coordination of Y0 (CLK) and Y1 (LOAD) timing. Therefore, the key to the problem is to write a general writing subroutine, which shifts the contents of D0, etc. from high to low into the shift register in sequence under the action of Y0 (CLK), and finally latches them into the corresponding internal control register and data display register by the rising edge of Y1 (LOAD). The ladder diagram of the writing subroutine is shown in Figure 2, and the serial communication workflow diagram between PLC and MAX7219 is shown in Figure 3.
5 Conclusion
The interface circuit between the LED light column display and PLC based on MAX7219, the digital display driver chip MAX7219 only occupies 3 output points of the programmable controller, and the number of extended display LEDs can be multiplied through chip cascading. When applied, the powerful programming ability of PLC can be used to flexibly program according to actual conditions to realize the display and function control of multi-line LEDs. By using the color change of the light column display, the purpose of combining display and warning can also be achieved.
Keywords:LED Reference address:Interface technology between LED light bar display and PLC

Previous article:Design of LED display system based on single chip microcomputer
Next article:Design of digital video signal processing circuit for LED full-color display screen

Recommended ReadingLatest update time:2024-11-16 15:29

Application of LED in Optical Mouse
Generally speaking, the optical mouse we commonly see usually refers to a mouse that uses optical components to generate movement data based on the logical judgment of the moving surface image. The working principle of the optical mouse is: there is a light-emitting diode inside the optical mouse, and th
[Power Management]
Technical development direction of LED lights
The prospects of LED lights As the problem of greenhouse gas emissions from the earth becomes increasingly serious and approaches the critical point of the earth's self-regulation, countries have introduced relevant policies one after another. Governments around the world, including my country, must urgen
[Power Management]
Technical development direction of LED lights
Design of a simple LED photoelectric characteristics test device
    1 Introduction   LED (Light-Emitting-Diode), or light-emitting diode, is gradually replacing traditional incandescent lamps and fluorescent lamps with its advantages of high efficiency, energy saving, environmental protection, long life and high reliability, becoming a new generation of lighting sources. Governmen
[Microcontroller]
Design of a simple LED photoelectric characteristics test device
PI LYTSwitchTM-6 LYT6068C based 35W LED lighting application solution
Today, global lighting electricity consumption accounts for about 18% of the total annual electricity consumption. The conflict in the Russia-Ukraine war in 2022 caused energy costs to rise. The demand for energy conservation is a policy that governments around the world are vigorously promoting, which has led to an
[Embedded]
PI LYTSwitchTM-6 LYT6068C based 35W LED lighting application solution
How to control and improve the quality of LED full-color display screen
LED display screens are widely used in large-size video displays for indoor and outdoor use, such as advertising media, traffic information, and sports stadiums, with their irreplaceable advantages in large size, high brightness, and environmental adaptability. With the rapid improvement of LED chip technology, LED pac
[Power Management]
The influence of LED devices on the performance parameters of LED full-color display screens
1. OverviewLED full-color display is a new type of indoor and outdoor large-size electronic communication media. It has the characteristics of large size, good environmental adaptability, high brightness, dynamic playback, etc. It is unique in the field of indoor and outdoor large-size electronic communication medi
[Power Management]
DIY luminous LED flashlight
LED flashlights are used a lot, but in the dark night, when we can't see anything, we can't find the flashlight at all. What should we do? In the past, to solve this problem, I used to apply luminous materials around the LED of the flashlight, but the effect was not good. If I didn't use it for a long time, I s
[Power Management]
DIY luminous LED flashlight
A GPRS wireless LED display information release system is used for product implementation
1. Overview Since the information input of traditional LED display screens can only be carried out by directly connecting to the computer through a data cable, the traditional LED display screen cannot meet the needs of remote information real-time release, and thus cannot build a large-scale networked LED scre
[Power Management]
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号