Design of rotating LED screen display controller based on TLC5947

Publisher:心满意足Latest update time:2012-03-23 Source: 21ICKeywords:TLC5947 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

Among various devices, display devices play an important role. Without display devices, it is like a person without eyes. Many internal things cannot be seen. Display devices are very important and common, but their appearance is always so monotonous, like models. The rotating LED screen has attracted the attention of electronic enthusiasts with its novelty and 360° viewing angle. This project combines touch technology with the rotating LED screen through the main control chip STM32F103, which can realize the clock change. You can also use touch technology to play some small games on the rotating LED, so that the rotating LED is no longer just a single ornamental technology.

The rotating LED display screen is a new type of display screen that realizes graphic display by synchronously controlling the position and lighting state of light-emitting diodes (LEDs). It has been rapidly developed due to its novel structure, low cost and 360° visual angle. At present, common LED display screens are displayed in a scanning manner. The implementation principle is to control different batches of LEDs to light up in turn in different time periods. According to the visual persistence characteristics of the human eye, when the scanning frame rate reaches more than 24Hz, the human eye cannot feel the scanning process, but a stable image. The rotating display screen realizes the display of graphics by controlling a row or a column of LEDs to quickly move their positions and change the lighting state. If the LED changes rapidly at each position, a stable image can also be displayed. The POV principle (i.e., the visual retention principle) is used for display screens. The advantage is that a small number of LEDs can be used to realize a display screen that can only be realized by a large number of LEDs in traditional methods. The LED is controlled by a single-chip microcomputer, and the touch button provides user interaction with the system. The landscape of the rotating LED floating in the air brings visual enjoyment.

Based on this situation and principle, this paper proposes a design of a rotating LED screen display controller based on TI's TLC5947 driver chip and STM32F103. The rotating LED screen adopts the principle of human visual frequency retention. The rotating LED virtual screen made by the microcontroller can fully realize a new display technology that can only be achieved by a large number of LEDs in the traditional way with a small amount of LEDs under the precise control of the microcontroller. The rotating three-primary color full-color LED is based on the RGB principle. By changing the hue, saturation and intensity of the three colors, a maximum of 36 colors of true color picture display can be achieved, making the display more gorgeous and dazzling. Compared with flat-panel LED display screens and other display technologies (such as CRT, LCD, PDP), the rotating linear array LED screen has several obvious advantages such as low cost, high resolution and low power consumption.

1 System hardware design

STM32F103 is connected to LED through TLC5947 to control the display of LED lights on the rotating board. For example, the single-chip microcomputer STM32F103 can be used to control the LED lights to rotate and display the clock appearance or various graphics. If conditions permit, some simple games can be displayed. The LED is connected to the ARM processor, and the ARM processor processes the touch signal to change the display style of the LED light, from the base state pointer clock to the digital display style and change the display background, and can also perform time calibration operations. The TLC5947 drives the rotating LED screen display control circuit as shown in Figure 1.

a.JPG

1.1 Introduction to STM32F103

The STM32F103 controller was selected. The STM32F103 is an enhanced series with a maximum operating clock frequency of 72 MHz. It has an ARM Cortex-M3 core, 128-256 KB Flash, 20-48 KB RAM, 8 MHz CPU crystal, 32.768 kHz RTC crystal, and abundant peripherals (64 fast I/O ports) and 4 GB linear address space. The emulator used by ARM is very expensive, while the debugging tools for microcontrollers are very cheap. In contrast, the Cortex-M3 reference microcontroller uses a pin specifically for debugging, thus saving a lot of manpower and material resources. The Cortex-M3 integrates most of the memory controllers, so that the Flash can be directly connected to the outside of the MCU, reducing the design difficulty and application barriers. The Cortex-M3 processor combines a variety of breakthrough technologies, enabling it to achieve a combination of low power consumption, low cost, and high performance (or two). The programming supports ISP download function and can be powered by USB port and JLINK emulator, which is very convenient to use.
1.2 Introduction to TLC5947
TLC5947 is a 24-channel 12-bit PWM pulse width modulation LED driver chip launched by TI (Texas Instruments). TLC5947 adopts ultra-small 32-pin QFN advanced package. It provides accurate constant current value for LED, and the difference between channels and chips is only ±2%; high-speed transmission rate (30 MHz for single chip, 15 MHz for cascade); interleaving time delay between output channels to avoid transmission errors; the chip has a temperature detection system inside. When the temperature of the chip is too high, in order to protect the chip, it will automatically disconnect all output channels. When the temperature returns to normal, the chip will work normally; the chip supports cascading, and multiple chips can work together to drive a larger LED display screen. The current value of the 24 channels is set by the resistance between the external IREF and the ground. The resistance in the drive circuit is determined by the current of the driven LED lamp. The chip has a wide operating voltage range of 3.0 to 5.5 V and contains a 4 MHz internal crystal. TLC5947 is suitable for driving full-color LEDs and displays.
1.3 LED display screen
Use three-color (RGB) LED lights to achieve multiple color light sources and colorful output. At the same time, the LED itself also has considerable stability, high efficiency, high single color purity, and adjustable light intensity. The LED is connected to the ARM processor, and the ARM processor processes the touch signal to realize the change of the display style of the LED light, from the base state pointer clock to the digital display, and change its display background. It can also perform time calibration operations.

2 System software design
2.1 Design of point point-line-circle and its algorithm and formula
Point design mainly uses rectangular coordinates to circular coordinates to light up the lights at any position through coordinate conversion. Line design is derived from point design. On the basis of point design, Bresenham straight line algorithm is used to draw the required straight lines, oblique lines, and curves. Based on line design, rectangle painting, drawing, filling and other functions are derived.
After the program is initialized, the conversion from rectangular coordinates to polar coordinates is defined. In the program, radians are converted to degrees. When converting, negative data is considered. 360+ 0.5 is added to optimize the program to prevent errors. Distance and angle in the program The algorithm for converting e.jpg rectangular f.jpg
coordinates to circular coordinates is as follows:
b.JPG
After the rectangular coordinate conversion is completed, the light and dark of the point can be set, and then the Bresenham straight line algorithm is used to draw a straight line.

c.JPG


The overall flow of the program is shown in Figure 2. After the system is powered on, first read the initial state of the system, set the working state of ARM and TLC5947, and start wireless communication; then wait for the rotating screen to stabilize, initialize the menu, and wait for input commands; use Qtouch to control the transmission of commands to STM32F103 and execute commands (user interaction process); execute user command operations.

2.2 TLC5947 chip timing

The TLC5947 timing is shown in Figure 3. The chip has four main control pins: data input terminal SIN, external clock input terminal SCLK, grayscale register control terminal XIAT and output control terminal BLANK. The required grayscale data is sent to the SIN terminal through the data input port, and then the data is written into the grayscale data shift register inside the chip by controlling the clock signal SCLK. After that, the high and low level conversion of the grayscale register control terminal XLAT is used to update the internal grayscale data of the chip TLC5947. When the level of the XLAT pin changes and a rising edge is generated, the internal grayscale data of the TLC5947 will be updated once, that is, the data will be rewritten in the Grayscale LatchData in Figure 3. The data output of the chip is divided into two parts, one is the serial data output and the constant current source data output. The serial data output is connected after the grayscale data shift register. When the data in the register is full of 256 bits, the data can be output from the serial data port SOUT through a DQ trigger according to the change of the SCLK clock. This port is mainly the data input of the next chip when the chip is cascaded; and the constant current source data output OUT0~OUT23 is jointly controlled by the output control port BLANK and the chip's internal clock Oscillator Clock. The output current can be controlled by the external ground resistor of the chip's VREF pin, and the normal operation of the LED is guaranteed according to the current limiting parameters of the external LED. The system uses a 3.2 kΩ resistor, so the control of the chip is mainly the control of the 4 pin ports, which is relatively simple and convenient to operate.

d.JPG



3 Conclusions

In the experiment, two cascaded TLC5947 chips were tested through the main controller STM32F103. The peripheral circuit was connected to a three-color LED light. The external power supply voltage was a 5 V voltage regulator. After the conversion, the system power supply voltage was a 3.3 V voltage regulator. When the corresponding program control word was written, the three-color LED light could be displayed correctly, and both the single-color and mixed-color working modes were successfully realized. Moreover, the change time between LED lights can be controlled by the program. As long as the clock frequency of the main controller is appropriate, the change time is beyond the recognition ability of the human eye. In this way, the design of a full-color LED screen can be realized by changing different program control words.

Keywords:TLC5947 Reference address:Design of rotating LED screen display controller based on TLC5947

Previous article:The difference between LED backlight, LED and OLED imaging technology
Next article:NXPSSL2103 14W dimmable LED driver solution

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号