ARM11 clocked at 533 MHz, up to 667 MHz, 10 times higher than ARM7 clock speed, and has more on-chip resources, faster processing and more powerful. Based on the above characteristics, ARM11 can fully adapt to the design of network terminals with strong real-time performance.

In the design of the network terminal with ARM11 as the core, the LCD needs to display the parameters of the network communication and the working state of the device in real time in the terminal. The display content of the LCD is controlled by the instructions in the network transmission data, and the operation data of the network terminal is also required. Transmission to the computer through the network, so network communication and LCD display need a strong real-time to properly use the computer and ARM11 resources, thereby improving the system's operating efficiency.

Based on the ARM11 processor S3C6410, this paper designs a method for directly controlling the LCD display in the ARM11 kernel based on the Linux operating system, and designs a terminal working mode for both client and server using TCP/IP protocol.

1 ARM11 network terminal real-time communication characteristics analysis

1.1 Data Flow Analysis

In the system where the computer communicates with the ARM11, the processing speed of the computer is much faster than that of the ARM11. For example, if a task with a large workload such as data processing is allocated to the computer for processing, the resource consumption of the ARM11 can be greatly reduced, and the ARM11 can go faster. In response to other operations, in order to reduce the time of the ARM11 display task, the data processing of the image to be displayed by the ARM11 can be handed over to the computer. The computer processes the data according to the data requirements displayed by the ARM11, and then transmits the data to the ARM11 through the network to complete the display of the LCD. In addition, the ARM11 network terminal also transmits device operating status information to the computer, and the computer also transmits some control commands to the network terminal.

1.2 Analysis of communication protocols

Network communication necessarily involves the problem of communication protocols. Currently, the commonly used network protocols are UDP protocol and TCP/IP protocol. In the network communication with high real-time requirements, I hope that I can send it to the Internet, and I will receive the data. The UDP comparison between the two protocols meets this requirement, but it does not guarantee the validity of data transmission. When there is more data, serious packet loss may occur. Especially, the data such as the image data displayed by the LCD is large and the transmission is frequent. The data may seriously affect the liquid crystal display which is unacceptable. In contrast, the TCP/IP protocol guarantees the effectiveness of data transmission.

In the TCP/IP protocol ARM11 network terminal as a server or client can not be sent at any time, there is data to receive, for example, as the server receives the data from the computer, if the computer disconnects, then the network terminal If you want to send data to the computer again, you must wait until the computer again acts as a client to initiate a connection to the terminal. In order to solve this problem of TCP/IP protocol, this paper designs a dual-thread working mode in which the network terminal and the computer serve as the client and the server. In this working mode, the terminal and the computer can initiate and disconnect at any time, thereby doing When you want to send it at any time, you will receive it if you have data.

2 LCD display software design

2.1 LCD display method analysis

(1) Based on the Framebuffer drive method. There is a perfect Framebuffer driver under Linux, so you can use the ARM11 integrated LCD controller to control the LCD with Framebuffer. The Framebuffer is the abstraction of the display device as a frame buffer. After the user maps it to the process address space through memory mapping, you can directly Read and write operations, and operations can be directly reflected on the screen. The method has fast response speed, high execution efficiency, and simple application program, but the underlying hardware driver is complicated, and the hardware is difficult to write after the change of the hardware, which is difficult to implement. LCDs without a controller usually use this method.

(2) Direct reading and writing of GPIO driver mode. At present, there are many types of LCD screens with LCD controllers. ARM can write control commands and data to the controller to complete the initialization and display of the LCD. The display method software is relatively simple in design, takes up little code space, and can be driven by a simple control chip. For the LCD with its own controller, this paper designs a method to directly read and write GPIO to drive LCD. The method provides an interface to the LCD controller and the LCD application at the bottom layer. The read and write timings of the LCD controller are all completed in the underlying driver, and the underlying driver provides an initialization interface and a display data interface to the application. The method has less interaction with the kernel and the program execution efficiency is high.

2.2 LCD display implementation

Through the above analysis, this paper designs to directly read and write GPIO to drive the LCD screen with LCD controller. The program structure of this method is shown in Figure 1.

Real-time communication characteristics analysis and LCD display implementation of ARM11 network terminal

The following functions are mainly included in the underlying driver:

(1) Initialization function s3c6410_inTI. The function includes two parts of initialization: one is the initialization of the GPIO port control register connected to the LCD controller with ARM11. The core statement is writel(tmp, S3C64XX_GPICON), where writel is the write function of the driver layer, and tmp is the write control. The data of the register, S3C64XX_GPICON is the control register of the first group GPIO port in S3C6410. If other GPIO ports are used, the other control register macro definitions are used; the second is to initialize the LCD controller.

(2) Write data function s3c6410_WRData and write command function s3c6410_WRCommand. These two functions complete the write data and write commands to the LCD controller according to the write data timing and the write command timing of the specific LCD control register. The function for writing data to the GPIO is writel(tmp, S3C64XX_GPIDAT), and writel and tmp are the same as above. , S3C64XX_GPIDAT is the data register of the first group GPIO port in S3C64 10.

(3) Display the function s3c6410_LCDdisplay. This function returns the effect of displaying a specific picture or text at a specific position on the LCD screen by calling the write command function and the write data function.

(4) The system call interface function s3c64xx_ioctl (structfile*file, int cmd, long int data). This function defines s3c6410_inTI and s3c6410_LCDdisplay2 function interfaces through system calls iotcl(fd,1,xx) and iotcl(fd,2,xx) to be called by the application program, and the application can be initialized using iotcl(fd,1,xx). The crystal screen only needs to write data to the interface iotcl (fd, 2, xx) of the s3c6410_LCDdisplay to realize the LCD display of the data.

LED Tunnel Light Series

LED Tunnel light,Tunnel light of high protection grade

Kindwin Technology (H.K.) Limited , https://www.szktlled.com

Posted on