1 System Structure
The system mainly consists of three parts: PC, S3C4480X microprocessor and LCD touch screen module. The system structure diagram is shown in Figure 1.
Figure 1 System structure diagram
This system provides an interactive interface for industrial equipment based on S3C44BOX. Through this system, a visual human-machine interface can be provided for industrial equipment. The customized interface information from the PC is stored in the ARM FLASH memory. In the application, when the microprocessor receives the touch screen key information, it controls the industrial equipment. At the same time, the microprocessor also refreshes the LCD interface to complete the human-machine interaction.
2 System Hardware Design
The hardware circuit principle of the system is shown in Figure 2. The S3C4480X is the CPU core and the 320x240 dot matrix LCD touch screen is the main input and output device.
Figure 2 System hardware circuit schematic
2.1 LCD touch screen module OCMJ15x20D introduction
The display part of this system uses the OCMJ15x20D (320x240 dot matrix) D series Chinese LCD display module, where OCMJ stands for Okola Chinese integrated module. This is a dot matrix LCD display module with Chinese and English text and drawing modes. It has a built-in 512KByte ROM font code, which can display Chinese fonts, digital symbols, English, Japanese, European and other letters, and has a built-in two-page display memory. In the text mode, it can receive standard Chinese text internal codes to directly display Chinese, without entering the drawing mode to draw Chinese, thereby improving the efficiency of LCD display of Chinese. The module integrates a number of practical interfaces, including a built-in 10-Bit ADC. It provides a touch screen interface. The touch screen of OCMJ15X20D (V3.2) is controlled by FM7843, which has been integrated on the module. The module has reserved the control line of FM7843 for customers to use (J5 pin on OCMJ15X20D), which can be directly powered by 3V without external negative voltage.
The module FM7843 is a four-wire resistive touch screen input control chip. It is a 12-bit sampling analog-to-digital converter with a synchronous serial interface. The power consumption is 750μW at a throughput rate of 125kHz and a voltage of 2.7V. The power consumption in the off mode is only 0.5μW. It has the characteristics of low power consumption and high speed, so it is widely used. Pins X+, Y+, X-, and Y- are the analog input terminals of the converter, DCLK is the external clock input; CS is the chip select terminal: DIN is the serial input, and its control data is input through this pin; DOUT is the serial data output. It is used to output the converted touch position data. The maximum number is 4095 in binary; IN3 and IN4 are auxiliary inputs; PENIRQ is the PEN interrupt pin. Among them, S3C44BOX uses a total of 6 to connect to the FM7843 interface.
2.2 Working principle of the system
The OCMJ15x20D module has a built-in LCD controller, and the touch screen is installed on the LCD liquid crystal screen. The corresponding control circuit is designed to control the LCD and touch screen. When the user operates the touch screen, the module FM7843 control chip detects the touch point and sends the detected information to convert it into corresponding coordinates for the S3C44BOX processor to read.
3 System Software Design and Implementation
3.1 System Software Introduction
Users can customize the entire interface information through the visual human-machine interface customization software on the PC according to the needs of the control system in actual applications and the agreement between the control system and the human-machine interface. Then download the customized interface information to the ARM Flash, and you can easily customize the human-machine interface. In the application, the ARM processor interacts with the human-machine interface system by directly operating the I/O port to read the touch screen information. Then perform the corresponding operation according to the read information. The software part of the system consists of a user boot program and an application. After the system is running, the user boot program decides whether to update the interface information or run normally. If the interface information is updated, the system receives the interface customization information through the relevant function and saves it in the Flash, and then establishes a linked list network by reading the new interface customization information locally; if it runs normally, the old interface customization information is directly obtained from the local to establish a linked list network. The functions implemented by the application include touch screen input processing and interface display. Users can configure all software-related parameters of industrial equipment through this system.
3.2 Programming
3.2.1 Interface customization and display
The customization of the interface is achieved by building a network link list. After the link list network is built, the application stage begins, that is, the system enters the normal operation state. The operation of the human-computer interaction interface is realized by setting the current screen pointer, the current item pointer and the built link list network in the system.
Items on the same screen form a two-way circular linked list, and linked screens form a one-way circular linked list. Implementation method: First, establish a horizontal two-way circular linked list for each screen based on the screen; then traverse the two-way linked list of each screen, establish a link relationship for the items of each screen, and then form a linked list network. Display the items on the screen one by one by traversing the horizontal two-way circular linked list of the current screen. The processing of various items is as follows: ① When the screen item is text, read and display it directly. ② When the screen item is an integer or floating point. Request its value from the control system and display it. ③ When the screen item is an enumeration, request its value from the control system, and then read the corresponding string according to the value and display it. [page]
3.2.2 Touch screen information processing
The touch screen buttons are divided into numeric keys, screen change keys, confirmation keys and selection keys. Numeric keys are used to type the numbers pressed. The screen change key is used to switch the screen content and enter the link screen of the selected item. If there is no selected item on the current screen, it enters the screen of the first link. The selection key is mainly used to display the content of the drop-down menu on the screen. The confirmation key is used to select the content of the drop-down menu.
3.2.3 Main function and initialization
The main function of the software system adopts an infinite loop structure waiting for the touch key value.
4 Conclusion
This article makes full use of the built-in resources of OCMJ15x20D and S3C44BOX to design a software and hardware system for controlling LCD touch screen with ARM processor. The system has customizable features. It not only facilitates the user's operation of the machine tool, but also makes it simple and fast for developers to modify the interface and upgrade the product. This design provides a practical solution for the human-computer interaction system and can also be applied to the development of other embedded systems.
Innovation:
1. Make full use of the powerful functions of S3Cd44BOX and the built-in LCD driver resources of OCMJ15x20D to complete the driving of the LCD touch screen and design the human-computer interaction interface control system composed of S3C44BOX controlling the color display screen and the four-wire resistive touch screen.
2. The customizability of the operation interface makes this software system widely used in the design of similar products, and it also facilitates developers to upgrade products, greatly shortening the cycle of secondary software development.
Previous article:Design of virtual instrument based on CAN bus and MiniGUI using ARM+Linux architecture
Next article:Design of DIS acquisition system based on ARM
Recommended ReadingLatest update time:2024-11-16 20:56
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- Innolux's intelligent steer-by-wire solution makes cars smarter and safer
- 8051 MCU - Parity Check
- How to efficiently balance the sensitivity of tactile sensing interfaces
- What should I do if the servo motor shakes? What causes the servo motor to shake quickly?
- 【Brushless Motor】Analysis of three-phase BLDC motor and sharing of two popular development boards
- Midea Industrial Technology's subsidiaries Clou Electronics and Hekang New Energy jointly appeared at the Munich Battery Energy Storage Exhibition and Solar Energy Exhibition
- Guoxin Sichen | Application of ferroelectric memory PB85RS2MC in power battery management, with a capacity of 2M
- Analysis of common faults of frequency converter
- In a head-on competition with Qualcomm, what kind of cockpit products has Intel come up with?
- Dalian Rongke's all-vanadium liquid flow battery energy storage equipment industrialization project has entered the sprint stage before production
- Allegro MicroSystems Introduces Advanced Magnetic and Inductive Position Sensing Solutions at Electronica 2024
- Car key in the left hand, liveness detection radar in the right hand, UWB is imperative for cars!
- After a decade of rapid development, domestic CIS has entered the market
- Aegis Dagger Battery + Thor EM-i Super Hybrid, Geely New Energy has thrown out two "king bombs"
- A brief discussion on functional safety - fault, error, and failure
- In the smart car 2.0 cycle, these core industry chains are facing major opportunities!
- The United States and Japan are developing new batteries. CATL faces challenges? How should China's new energy battery industry respond?
- Murata launches high-precision 6-axis inertial sensor for automobiles
- Ford patents pre-charge alarm to help save costs and respond to emergencies
- New real-time microcontroller system from Texas Instruments enables smarter processing in automotive and industrial applications
- Mir MYC-YT507 Development Board Review: Development Environment Part 2: Python 2048 Game
- Double-T network band-stop filter and its variants
- New version of esptool
- Question about "Gain-Bandwidth Product GBW of Differential Amplifier Circuit"
- 006
- TM1668 Data Sheet
- Can the L298N chip drive a 24V63W brushed DC motor? If not, is there any chip that can drive it?
- What is 5G wireless WiFi? What is the difference between 5G wireless WiFi and 2.4G Wif
- How to understand switching AC-DC conversion in power supplies in a simple and easy way
- TDS water quality testing