Design of display screen controller based on ARM processor

Publisher:MagicalSerenadeLatest update time:2012-03-26 Source: 微计算机信息 Keywords:ARM Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

1 Introduction

LED display is a flat display screen composed of light-emitting diode dot matrix modules or pixel units, mainly used for information release in public places. It has the advantages of high luminous efficiency, long service life, flexible configuration, rich colors and strong adaptability to indoor and outdoor environments. This paper proposes a design scheme for a display controller based on a 32-bit high-performance ARM processor and μC/OS-II. It makes full use of the efficient multi-task management function of μC/OS-II and the powerful computing power of the ARM processor to realize the display of multiple windows on a single screen at any position, making the screen display content richer and the display mode more flexible. This makes the controller synchronized.

2. Overall structure design of controller hardware

The hardware structure block diagram of this controller is shown in Figure 1. The data processing module consists of an MCU, an SRAM and a FLASH memory. The MCU uses the LPC2214 processor based on the 32-bit ARM core. It has rich peripheral interface resources and powerful computing power and is the core of the entire controller. The SRAM is used as a cache for the MCU to perform special effects processing. The FLASH memory is used to store the displayed dot matrix information and some necessary parameters. The scanning control module consists of a CPLD and a video memory. The video memory is a SRAM, which is used to save a frame of data currently being displayed. The communication module includes an Ethernet module and a serial communication module, which can realize RS232, RS485 and industrial Ethernet communication between the PC and the controller.

Figure 1 Hardware block diagram of the controller

3 Detailed design of controller hardware

1. RTC circuit. LPC2214 integrates RTC function module, but because its clock source is VPB clock, it cannot be used when the chip is powered off, so it is not suitable for battery-powered systems. Therefore, we use an external RTC chip here - HT1381, a low-power serial real-time clock chip produced by HOLTEK. HT1381 uses serial transmission to interface with the microprocessor, and only three leads are needed to realize the microprocessor's access control to HT1381. The schematic diagram of the RTC circuit is shown in Figure 2. In the figure, C1, C2, G1 and the oscillators inside X1 and X2 form the clock generation circuit of HT1381. D1, D2, D3 and 3V rechargeable battery, +3.3V power supply form the power supply circuit of HT1381. When the system uses external power supply, D3 and D2 are turned on, D1 is turned off, and the external power supply supplies power to the chip on the one hand and charges the rechargeable battery on the other hand. When the system power supply stops, D3 is turned off, D1 is turned on, and the chip is powered by the battery.

Figure 2 RTC circuit

2. Temperature sensor circuit. DS18B20 is a single bus digital temperature sensor. DS18B20 uses a 3-pin package, and only one I/O line is required to read or write data from DS18B20. And data communication is carried out with the microcontroller in the form of serial communication. The device integrates semiconductor temperature-sensitive devices, A/D converters, memory, etc. on a very small circuit chip, and the sensor directly outputs the digital value of the temperature signal. The signal transmission adopts a single bus structure composed of two-core (or three-core) cables. Several digital temperature sensors can be connected to a single bus cable, and each sensor has a unique address code. The microcontroller can read the temperature value of a certain sensor by addressing the device, thereby simplifying the circuit structure of the signal acquisition system. The connection line of the acquisition port is reduced by 50 times, which not only saves the cost, but also brings great convenience to the on-site construction.

3. Serial interface circuit. Although Ethernet communication is now very popular, serial communication still has a wide range of applications in data acquisition and control systems due to its low wiring and low cost. The main difference between RS232 and RS485 is related to the use of balanced and unbalanced signals. RS232 uses unbalanced signals, while RS485 uses balanced signals. Which one to use depends mainly on two factors: transmission distance and electrical noise. When the transmission distance is less than 30 meters and the environmental electrical noise is small, it is best to use unbalanced RS232. When the transmission distance is longer but less than 300 meters, or when the impact of environmental electrical noise must be considered, it is best to use RS485. In addition, the two-wire communication method of RS485 can realize true multi-point two-way communication.

4. Automatic brightness adjustment circuit. When the ambient light is weak, the brightness of the LED screen should be reduced accordingly, otherwise it will be dazzling. When the ambient light is strong, the brightness of the LED screen should also be increased accordingly, otherwise the content displayed on the screen will not be clear. Therefore, the controller needs to automatically adjust the measurement according to the brightness of the surrounding light. In order to achieve the above functions, the system uses a photoresistor, which is connected in series with a certain value resistor. When the external ambient light changes, the resistance of the photoresistor changes, and the voltage divided by R2 also changes accordingly. Then the screen brightness is adjusted according to this voltage value. The specific circuit is shown in Figure 3. LPC2214 has an 8-channel 10-bit ADC converter with a reference voltage of 3.3V. The accuracy of the reference voltage will affect the conversion result of the ADC. R1 is an I/O port protection resistor, which is used to ensure that the circuit does not produce a short circuit fault.

Figure 3 Automatic brightness adjustment circuit [page]

5. LED display screen scanning drive circuit. The scanning logic of the LED display screen is implemented by CPLD, and the CPLD uses Altera's EPM1270. EPM1270 belongs to Altera's MAX II series. MAX II is the lowest cost CPLD device launched by Altera so far.

3 LED scanning logic design

LED scanning logic is implemented by CPLD, which has good combinational logic and timing logic functions, and can complete the scanning control signal required for LED display. The CPLD design block diagram is shown in Figure 4. It mainly includes the following modules: ⑴ Clock process: generates clocks of various frequencies; ⑵ FIFO: the interface between CPLD and MCU, used as data buffer, which enables MCU to perform full-speed write operations on the video memory; ⑶ Write address and data generator: generates addresses and data for writing to the video memory; ⑷ Read address generator: different scanning modes have different addressing modes when reading data from the video memory. The read address generator can generate different read video memory addresses according to different scanning modes, thereby completing 1/16, 1/8, 1/4 and other scanning modes; ⑸ Scan control circuit: under different scanning modes, generates corresponding scan control signals according to the data read from the video memory; ⑹ Read-write switching circuit: switches the read and write status of the video memory.

Figure 4 CPLD design block diagram

4 Software Design Based on μc/OS-II Controller

In order to realize the display of single screen and multiple windows at any position, we design the software based on μc/OS-II, so that we can make full use of the efficient task scheduling algorithm of the operating system and hand over the display of each window to a single task, which greatly improves the running speed and reliability of the system and makes the development and expansion of the program more convenient. The structure of the program is shown in Figure 5. After the controller is powered on, the system is initialized first, and then the screen parameters are read from FLASH to initialize the parameters. Then the task TaskControl is established. TaskControl is used to manage the display tasks of each window in real time. It has a higher priority than the display tasks of each window. It queries the reset flag every 1s. If reset=1, the previously established window display tasks are deleted, and then the new number of windows is read from FLASH, and then a new task is established accordingly, and the display of each window is controlled by a single task.

Figure 5 System program structure diagram

1. Cluster communication protocol of RS485 bus. The specific process is as follows: First, the PC sends an address frame to the controller, and the address frame uses MARK verification. It includes 6 bytes. The first byte is the address code. After the controller receives this byte, it first determines whether it is the same as its own address. If it is the same, it continues to receive the next byte, otherwise it exits the interrupt. The address of each controller can be set through the DIP switch on the controller. The next three bytes are screen parameters, which mainly include the horizontal and vertical dots of the screen and the color of the display screen (single or double color). After receiving these parameters, the controller first compares them with its own parameters. If the parameters are not the same, it exits the interrupt, otherwise it continues to receive the next byte. The next byte sent is the operation code, which mainly tells the controller what kind of operation is to be performed below. These operations include loading screen parameters, system reset, loading data, power on and off, etc. The controller will operate the Flash according to the operation code.

2. Design of GUI interface. GUI is the abbreviation of Graphic User Interface. It is a product based on computer graphics. It can be used to improve the friendliness of human-computer interaction. We can use it to achieve many unexpected effects on LED screens. Here we provide the most basic functions of drawing points, lines, circles, etc. on LED screens.

(1) Point drawing function. All graphics are composed of points, which are the most basic elements of graphics. When describing a point, its coordinate value (X, Y) and color are needed. For a two-color LED screen, the color value 0 represents green, 1 represents red, and 2 represents yellow. When drawing a point, first convert the coordinate value of the specified point into the corresponding byte on the video memory, and then perform color processing on the corresponding byte. Then write this byte to the video memory to complete the display of the point. (2) Line drawing function. For the drawing of straight lines, there are three drawing methods: horizontal line, vertical line and general straight line. In fact, general straight lines include horizontal lines and vertical lines, but because these two types of straight lines are more special, the drawing operation does not require as many operations as other straight lines, so separating them is beneficial to increase the drawing speed.

The author's innovation

This paper mainly introduces a design scheme of display screen controller based on 32-bit high-performance ARM processor and μC/OS-II. This system makes full use of the efficient multi-task management function of μC/OS-II and the powerful computing power of ARM processor to realize the display of multiple windows in any position on a single screen, making the screen display content richer, the display mode more flexible, and the controller synchronized.

References:

[1] Gong Zhaogang. Embedded controller of LED variable information board based on ARM processor[J]. Modern Display. 2006, (06)

[2] Zhang Shumeng. Research and implementation of embedded systems and FPGA in LED display screens[J]. Wuhan University of Technology. 2005

[3] Jean. Labrosse著,邵贝贝等译.嵌入式操作系统μC/OS-II(第二版)[M].北京航空航天大学出版社.2005年

[4] Song Hui, Gao Xiaoming. Porting of embedded operating system μC/OS-II based on ARM[J]. Microcomputer Information, 2006,2-2: 135-136

Keywords:ARM Reference address:Design of display screen controller based on ARM processor

Previous article:Design and Implementation of EmJTAG Protocol Converter
Next article:Design of Embedded Wireless Video Monitoring System

Recommended ReadingLatest update time:2024-11-16 16:19

Systematic learning of ARM Part 3 - load/store instructions - loading and storing instructions
1. Introduction:     In the ARM architecture, the CPU is not allowed to directly access memory units.     In order to solve the need to access memory units, registers are used as relays. The memory and registers interact through load/store instructions, and the CPU accesses the registers.     Memory units and regi
[Microcontroller]
ARM assembly learning---how to write ARM assembly program
I. Introduction 1. Look at a program:                  AREA TigerJohn,CODE,READONLY; declare code segment                      CODE32; declared as 32-bit ARM instruction                      ENTRY; declare program entry START MOV R0,#0                      MOV R1 ,#1                      ADD R1, R1, R0                
[Microcontroller]
ARM7 vs ARM Cortex
1. ARM implementation method ARM Cortex is the latest ARM embedded core based on the ARM7v architecture. It uses Harvard architecture and separate instruction and data buses (under the von Neumann architecture, data and instructions share a bus). In essence, the Harvard architecture is more complex physically,
[Microcontroller]
Calling C library function printf in arm assembly language
Today, when I was writing an ARM assembly code, I wanted to display string information in the program, but it didn't work. I thought it was because of the implementation of printf in the C library. I finally solved the problem in the afternoon. It turned out that the C library was not initialized in the assembly progra
[Microcontroller]
Several working modes and working states of Arm
There are 7 ARM processor working modes: USR mode     Normal user mode, normal program execution mode FIQ mode (Fast Interrupt Request)      handles fast interrupts, supports high-speed data transmission or channel processing IRQ mode      handles normal interrupts SVC mode (Supervisor)      operating system protec
[Microcontroller]
Several working modes and working states of Arm
Intel and Arm sign a memorandum of understanding for the emerging enterprise support program to help startups develop Intel 18A process chips
On March 25, Intel and Arm recently signed a memorandum of understanding, confirming their cooperation on the "Emerging Enterprise Support Program." The program was originally announced at the Intel Foundry Direct Connect event in February. According to the plan, the two parties will work together to support st
[Semiconductor design/manufacturing]
ARM working mode - how to use exceptions and interrupts
A brief introduction to Arm920T registers: R1-R15: General registers R13: Stack pointer register R14: Program connection register. When the BL subroutine call instruction is executed, R14 obtains a backup of R15 (program counter register pc). When an interrupt or exception occurs, the corresponding R14_svc, R14_irq, e
[Microcontroller]
Realization of CAN bus communication based on ARM9 under Linux environment
1. Introduction The CAN (Controller Area Network) bus was first proposed by the German company BOSCH to realize microcontroller communication in the automotive environment, exchange information between various electronic control units ECU on the vehicle, and form an automotive electronic control network. Due to its l
[Microcontroller]
Realization of CAN bus communication based on ARM9 under Linux environment
Latest Microcontroller Articles
  • Download from the Internet--ARM Getting Started Notes
    A brief introduction: From today on, the ARM notebook of the rookie is open, and it can be regarded as a place to store these notes. Why publish it? Maybe you are interested in it. In fact, the reason for these notes is ...
  • Learn ARM development(22)
    Turning off and on interrupts Interrupts are an efficient dialogue mechanism, but sometimes you don't want to interrupt the program while it is running. For example, when you are printing something, the program suddenly interrupts and another ...
  • Learn ARM development(21)
    First, declare the task pointer, because it will be used later. Task pointer volatile TASK_TCB* volatile g_pCurrentTask = NULL;volatile TASK_TCB* vol ...
  • Learn ARM development(20)
    With the previous Tick interrupt, the basic task switching conditions are ready. However, this "easterly" is also difficult to understand. Only through continuous practice can we understand it. ...
  • Learn ARM development(19)
    After many days of hard work, I finally got the interrupt working. But in order to allow RTOS to use timer interrupts, what kind of interrupts can be implemented in S3C44B0? There are two methods in S3C44B0. ...
  • Learn ARM development(14)
  • Learn ARM development(15)
  • Learn ARM development(16)
  • Learn ARM development(17)
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号