Design of LED display screen control system based on dual RAM technology

Publisher:advancement4Latest update time:2010-12-13 Keywords:RAM Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

introduction

Long LED display screens are widely used in life. The control circuit of this type of display screen is simple, the scanning lines are limited, and the amount of information displayed is not very large. When the amount of information displayed is relatively large, if a general long-screen display screen is used, the information will be displayed too slowly. Even if an ultra-long screen is used, its data output rate is very low, and the refresh frequency of the display screen may not meet the display requirements. The rectangular display screen displays a large amount of information, and the height of the display screen can be expanded as needed. There is no frequency limit, which can make up for the shortcomings of the long display screen when displaying information. This design uses dual RAM technology to organize the control system data used to control the rectangular display screen, improves the memory efficiency when the information is displayed in a vertical cycle, greatly reduces the occupancy rate of the data storage, and the refresh frequency requirement is not very high.

1 Display data organization

When the area to be displayed is less than or equal to the actual display area, static display can be used. But most of the time, the area to be displayed is greater than or equal to the actual display area, as shown in Figure 1. In order to simplify the analysis of the problem, this article sets the display area height to 4 times the height of the LED display screen, and the width is equal to the width of the LED display screen. Let the height of the display screen be Lh and the width be Lw, then the display area height Dh=4Lh and the width Dw=Lw. This article takes monochrome display as the description object, and Bw=Bn=8 (Bw is the number of scan lines, Bn is the output data width), as shown in Figure 1.

For an LED display screen, once the width Lw and height Lh are determined, the arrangement of the display screen unit board is also determined. The distance between two adjacent scan lines of the unit board is Sw, and the display screen has Bw scan lines, namely Y0, Y1, ..., YBw-1. Each Sw row corresponds to one bit of display data, and each point on the display screen corresponds to a bit of a byte in the memory. The Bw scan lines point to: Y0=O, Y1=Sw, ..., BBw-1=(Bw-1)Sw. Use the static display data organization method to organize the display data for display blocks A, B, C, and D respectively. First, organize the display information of display block A (X is the column number):

①X=0, that is, the display data of each point where each row of the current scan line intersects with the Oth column is stored in the first storage unit of the memory in the order of D0, D1, ..., DBw-1.

② The X value increases by 1, and the display data of each point where each row of the current scan line intersects with the column corresponding to the X value is stored in the next storage unit of the memory, until all Dw data from X=0 to X=Dw-1 are stored in the memory in sequence.

③The Bw scan lines move down one row, and repeat steps ① to ② until Y0 moves to the Sw-1 row.

④Data organization is completed.

Display areas B, C, and D organize display data according to the data organization method of A. The organized display data blocks are stored in RAM0 in the order of A, B, C, and D, and then the display data blocks A, B, C, and D in RAM0 are copied to RAM1 in the order of B, C, D, and A. The display data of any two adjacent display blocks have the same address storage area in the two RAMs. The corresponding relationship between the display data and the memory of RAM0 and RAM1 is shown in Figure 2.

As shown in Figure 2, scan group 1 from Y0=0 to Y0=Sw-1 corresponds to display block A, the data has been organized and stored in the memory, and the display data can be directly output; scan group 2 from Y0=Lh to Y0=Lh+ Sw-1, the corresponding display block B has also been organized and can be directly output. However, the position of scan group 3 is unusual, and its scan lines correspond to two blocks A and B respectively; the Oth, 1st, ... Bw-1th scan lines correspond to the 1st, 2nd, ..., Bw-2 of scan group 1 of display block A respectively; and the Bw-1th scan line corresponds to the Oth scan line of scan group 2 of display block B. If the screen data corresponding to scan group 3 is to be displayed on the display screen, the display data organized by the 1st, 2nd, ..., Bw-1th scan lines of scan group 1 and the Oth scan line of scan group 2 must be used as output data at the same time. Since the display data of display blocks A and B are organized separately, D0, D2, ..., DBw-1 of RAM0 and D0 of RAMl are used as Bw bits of data output to the display screen. This requires selecting the required Bw bits as output data from the 2Bw bits output simultaneously by the two RAMs, and these Bw bits of data are continuous.

Display steps (only the vertical movement display effect is considered here); when the dual RAM technology outputs the display data, the two data with the same address in the two RAMs are output simultaneously. Therefore, if RAMO is set as the main memory and RAM1 is set as the slave memory, when the display data of the two RAMs are stored in a serial memory, the even address unit should store the data of RAM0, and the odd address unit should store the data of RAM1. Since the data width is 8, 16 bits of data are output each time. If the (XL, YL) point in the display area is used as the display starting point, and a screen of display information is displayed on the LED screen, then its data selection control bit is only related to YL, scan line and scan width Sw. The starting row coordinate of the display area is YL, and a display area has Bw·Sw rows, then the block where YL is located is:


It is not very meaningful to discuss the coordinates of YL in the actual display area here. We only need to pay attention to the relative coordinates of YL in the current display block. NL=YL%(Bw·Sw) is the relative vertical coordinate of YL in the current display block, and the relative coordinates are (NL, YL). The basis of dynamic display is static display. Static display is characterized by displaying a screen from a specific line. When the display screen starts to display information from the YLth line, because a display area has Sw·Dw data, the starting address of the data displayed in the block where YL is located is:


A display area is divided into Sw areas, and the area where YL is located is recorded as:


One area stores Dw display data, so the relative offset address between the partition address where YL is located and the starting address of the block where it is located is (YL%Sw)·Dw. Therefore, as long as the starting row coordinates of the display information are known, the storage address of the display data in the memory can be obtained.

NL=YL/(Bw·Sw), where i=NL/Sw(0≤i≤7), indicates the number of data bits that need to be selected when the display information spans two data blocks. After the memory outputs 16 bits of data [D0, D1, ..., D15], the Di bit is used to control the selection of continuous 8 bits of data [Di, Di+1, ..., D7, ..., D7+i] to be output to the display screen. When the data is output 16 bits starting from the Di bit of a byte, such as [Di, Di+1, ..., D7, ..., D15, D0, ..., Di-1], the first 8 bits are redundant data in the current display, and the following 8 bits of data [D8+i, ..., D15, D0, ..., Di-1] are exactly the 8 bits of data to be output to the display screen. When these 16 bits of data are serially output to an 8-bit shift register, the shift register can just accommodate the upper 8 bits of data and output them for display. The same is true for the output of each column of data afterwards, and no additional instructions or circuits are required to select and output the output data. Before the output of the first column of each row, the microcontroller simulates i clock pulses to output to the memory, so that the output data is misaligned and the data is output from the Di position. In addition, when the display information happens to be a block among the A, B, C, and D blocks, there is no need to generate simulated pulses to select the data, but the data is directly output and displayed. Through analysis, it can be seen that the SPI module just has this function. By simulating i clock pulses additionally by the microcontroller and outputting them to the clock signal end of the serial memory, the data can be misaligned and output from a specified position Di. When the display information crosses the Sw-1 interval, if a display has not been completed, the memory address should return to the starting address of the block where YL is located, and the display data should be output from the starting address, and the number of pulses i simulated by the microcontroller will also change accordingly.

[page]

2 LED display control system design

LED display control circuit. In order to improve data output efficiency, the VRS51L3074 microcontroller with SPI function module from Ramtron is used. The clock frequency of VRS51L3074 is 40 M-Hz, the instruction cycle is short, the processing speed is fast, and the efficiency is high; the operating voltage is about 3.3 V, but it is compatible with 5 V. SST25VF016B is an 8-pin serial Flash with SPI interface. 7 4LSl64 is a shift register.

2.1 SPI Function Module of VRS51L3074

The SPI clock frequency of VRS51L3074 can be adjusted in the range of SysClk/2 to SysClk/1024, and the maximum SPI clock frequency can reach 20MHz. When VRS51L3074 is used as SPI master, SPI operation control, configuration, status monitoring and other working environments can be set.

Configuration register SPICONFIG: mainly sets the chip select signal control mode and SPI interrupt.

Status register SPISTATUS: Mainly used to monitor the SPI operating status.

Transfer word length register SPISIZE: Set the transfer word length. This article sets it to 16 bits, which means 16 bits of data are output each time.

Control register SPICTRL: Set the SPI clock rate, clock phase/polarity, chip select signal, and SPI clock frequency.

Data registers SPIRXTX0~SPIRXTX3: used to access the 32-bit transceiver buffer of the SPI interface. Writing to the data registers is to send data to the transmit buffer, and reading from the data registers is to retrieve the received data from the receive buffer. The transmit and receive buffers of the SPI interface both use a double buffer structure to reduce data conflicts and improve data transmission efficiency from the hardware. Writing to the SPIRXTX0 register in master mode will start SPI transmission. When the length of each line of the transmission word is greater than 8, the SPIRXTX0 register should be written last.

After inputting control signals and data addresses into the serial Flash, the serial Flash data transmission is started, and the display data is output under the drive of the SPI clock. In addition, the microcontroller can be used to simulate the serial Flash clock signal to control the output of any bit of data.

2.2 Data selection control circuit

The LED display control system is shown in Figure 3. The VRS51L3074 microcontroller has an accurate 40 MHz oscillator inside, and does not require an external crystal oscillator circuit to provide the system clock. The data display uses the SST25VF016B with a memory of 16 Mb. When the dual RAM technology outputs display data, the two data with the same address in the two RAMs are output at the same time. Therefore, when the display data of the two RAMs are stored in a serial memory, the even address unit should store the data of RAM0, and the odd address unit should store the data of RAM1. When the data is output, 16 bits of data are output each time. The operating voltage of the serial memory and the microcontroller are both around 3.3 V, but the VRS51L3074 is compatible with 5V, which simplifies the control circuit. When the control signal and display data are output to the register 74LS164 and the display, 74LVC07 is required for level conversion.

The process of the control system controlling the display data output is:

① Send the scan line address to the LED display through the lower 4 bits of the P2 port.

② By displaying the position of the data in the display area, the address of the display data in the memory is calculated, and the number of bits i selected by the data is calculated.

③ Through the single-chip microcomputer P3.0 port, simulate the shift pulse and output it to the serial Flash clock signal. The number of shift pulses is determined by the number of data selection bits i. This causes the output data to be misaligned and the output display data is correctly selected.

④ Start SPI to read display data, and set the SPI transmission word length to 16 bits. The analog pulse has been output to the serial Flash, causing the data to be misaligned. The 16-bit data [Di, Di+1, ..., D7, ..., D15, D0, ..., Di-1] is output, and the data output to the display [D8+i, ..., D15, D0, ..., Di-1] is in the upper 8 bits, which can be stored in the shift register after shifting. After the first data of each row is output, the data of each column of this row is directly output.

⑤After the 16-bit data is output, an SCK pulse is generated through the P3.1 pin to shift the data output in the shift register 74LSl64 into the serial shift register 74HC595 of the unit board.

⑥ Repeat steps ④ to ⑤ until a row of data is completely output. P3.2 generates an RCK pulse, the read row of data will be output and displayed, and then the scan line moves down one row.

⑦Repeat steps ① to ⑥.

This circuit has the following features: after the display data is output from the serial Flash, it is directly output to the shift register 74LS164 in DMA mode without being processed by the single-chip microcomputer, and serial-to-parallel conversion is realized at the same time, which not only saves data processing time but also improves display efficiency. Before each field of data is output, the data selection bit i is calculated by the address of the information in the display area, and i pulses are simulated and output to the serial Flash through the P3.0 port, i bits of data are shifted out, and the data is misaligned, so that the output display data can be directly stored in the shift register in the high 8 bits of the 16-bit output data and output to the display screen. In the future, when the display data of each column in the same row is output, there is no need to judge the data selection bit, and the display data is directly output from the memory to the display screen.

The memory efficiency analysis is listed in Table 1.

As can be seen from Table 1, the use of dual RAM technology for output display greatly improves memory efficiency and reduces the occupancy of display data memory. When the amount of displayed information is large, dynamic data organization uses more memory and has low utilization, and the use of dual RAM technology just solves this problem. The memory efficiency of one RAM (static display) is 100%, and the efficiency of dual RAM is 50%. When there are N RAMs, the efficiency is (N-1)/N.

For the control circuit shown in Figure 3, the program code is written according to the data output control flow. A screen of information is randomly displayed, and the display data has been stored in the serial Flash in sequence.

Conclusion

This control system uses the characteristics of serial Flash output data to greatly reduce the data processing time, and outputs the display data to the display screen in DMA mode, which not only improves the display efficiency, but also makes up for the lack of information display on the long display screen. Dual RAM technology greatly improves the memory usage efficiency during vertical movement. All data blocks are organized in a static display mode, so the display data efficiency of each RAM is 100%, and the efficiency of dual RAM is 50%. This article stores the display data in a Flash, and the efficiency is also 50%. Compared with the dynamic display organization method, it reduces the occupancy rate of the display data memory during vertical movement and improves the storage efficiency. In addition, the dual RAM technology can be used as a basis to expand the multi-RAM mode, increase the display height, increase the display information per screen, and further improve the storage efficiency. This system still has room for improvement, such as using two RAMs to store different data directly after organizing the display data with dual RAM, and controlling the direct output of the display data to increase the output rate.

Keywords:RAM Reference address:Design of LED display screen control system based on dual RAM technology

Previous article:Design of electronic nose for lung cancer detection based on virtual gas sensor array
Next article:New technology developed in the United States is expected to increase the lifespan of implantable devices

Recommended ReadingLatest update time:2024-11-17 03:36

Method of relocating ARM interrupt vector table to off-chip RAM
Since the PC pointer automatically jumps to address 0x00 to execute after an interrupt or exception occurs in the ARM CPU (while saving some CPSR registers, switching the operating mode, etc.), the interrupt vector table must be stored at address 0x00. If we want to relocate the interrupt vector table to off-chip RAM,
[Microcontroller]
New test: Chrome uses more than 10 times the RAM of Safari on macOS Big Sur
According to a test conducted by Flotato creator Morten Just, Google Chrome uses more than 10 times more RAM than Safari on macOS Big Sur under normal and light web browsing scenarios. In a blog post, Just outlined his testing of the two browsers on the latest version of macOS. The first test was conducted on a virt
[Mobile phone portable]
New test: Chrome uses more than 10 times the RAM of Safari on macOS Big Sur
Analysis of debugging techniques using ROM monitor
RedBoot, also known as Red Hat embedded debugging boot loader, is an independent open source boot/loader for embedded systems. Anyone can download the RedBoot source code with the Red Hat eCos public license from the Internet. Although RedBoot uses software modules derived from the eCos real-time operating
[Microcontroller]
Analysis of debugging techniques using ROM monitor
Mobile phone production slows down, DRAM memory prices will continue to fall in the third quarter
                                                According to a survey by DRAMeXchange, a semiconductor research center of TrendForce, the growth rate of demand in the smartphone market slowed down in the third quarter, which was not as good as the previous peak seasons of more than 10% quarterly growth. It is estimat
[Embedded]
Mobile phone production slows down, DRAM memory prices will continue to fall in the third quarter
Geekbench 5 data shows that the ASUS ROG 5 phone is equipped with 18GB of memory
     It has been reported that the upcoming Asus ROG Phone 5 will feature 16GB of RAM, a threshold we believe no Android flagship phone manufacturer will cross for a long time. Now the latest exposure shows that the ROG Phone 5 may be the first phone to be equipped with 18GB of RAM.   Apparently, a new ROG Phone 5 mod
[Mobile phone portable]
ColorOS promotes OPPO's memory anti-fragmentation engine
What is the memory anti-fragmentation engine promoted by OPPO? What is its function? In response to the above questions, the official Weibo account of ColorOS has specially published an article to popularize science. Let's take a look. What is the memory defragmentation engine? The memory anti-fragmentation engine is
[Mobile phone portable]
8051 unique memory type
code Program memory read with MOVC @A+DPTR data Internal data memory that can be directly accessed idata Internal data memory accessed by Mov @Rn bdata Bit addressable internal memory xdata External data memory accessed by MOVX @DPTR pdata External data memory accessed by MOVX @Rn   Special data types   bit General bi
[Microcontroller]
Application of Extended RAM in STC MCU
RAM is the data space used to store random variables during program execution. The default internal RAM of the 51 microcontroller is only 128 bytes, which increases to 256 bytes for the 52 microcontroller, 512 bytes for the STC89C52, and 1280 bytes for the STC89C54, 55, 58, 516, etc. For programmers, the more RAM a
[Microcontroller]
Latest Medical Electronics 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号