0 Introduction
With the development of science and technology, ARM is increasingly used in all aspects of society. ARM chips are widely used in wireless products, PDAs, GPS, networks, consumer electronics, STBs and smart cards. LPC2138 is a RISC microprocessor based on ARM7TDMI produced by Philips, with a main frequency of up to 50MHz. Liquid crystal display is a human-computer interaction interface that reflects the input/output of the system in embedded systems. Liquid crystal display is widely used for its advantages such as micro power consumption, small size, rich display content, modularization, and simple interface circuits. Based on the introduction of the pin structure and function of the LM016L liquid crystal module with HD44780 as the controller, this article builds the hardware interface circuit between LM016L and LPC2138 chips, writes the display program in C language, and uses PROTEUS software for functional simulation.
1 Introduction to LCD module structure and function
The LM016L LCD module uses the HD44780 controller. The HD44780 has a simple but powerful instruction set that can realize functions such as character movement and flashing. The HD44780 controller consists of two 8-bit registers, an instruction register (IR) and a data register (DR), a busy flag (BF), a display data RAM (DDRAM), a character generator ROM (CGROM), a character generator RAM (CGRAM), and an address counter (AC). IR is used to store instruction codes and can only be written but not read; DR is used to store data, which is automatically written to DDRAM and CGRAM by internal operations, or temporarily stores data read from DDRAM and CGRAM. When BF is 1, the LCD module is in internal processing mode and does not respond to external operation instructions or receive data. DDRAM is used to store displayed characters and can store 80 character codes. CGROM generates 160 types of 5 x 7 dot matrix characters and 32 types of 5×10 dot matrix characters from 8-bit character codes, and the corresponding relationship between 8-bit character codes and characters. CGRAM is reserved for users to write special characters, and its capacity is only 64 bytes. You can customize 8 5×7 dot matrix characters or 4 5×10 dot matrix characters. AC can store DDRAM and CGRAM addresses. If the address code is written to IR with the instruction, IR will automatically load the address code into AC and select DDRAM or CGRAM unit at the same time. The pin functions of LMO16L LCD module are shown in Table 1 below.
2 LCD module simulation based on Proteus ISIS 7
2.1 Interface Design
Run Proteus ISIS 7 to enter the design interface, and select the required components in the component library as shown in Figure 1. The P0.0-P0.7 ports of Lpc2138 are used as the output terminals of 8-bit data, and P0.8, P0.9, and P0.10 are used as the output terminals of control signals. The connected circuit is shown in Figure 1.
2.2 Software Design
After the circuit diagram is drawn, the driver program of LM016L can be written. There are two types of operations of LM016L: read operation and write operation. Generally, it is not necessary to read data from the LCD, so the operation of the LCD is mainly two write operations: write instruction and write data. For the busy flag (BF), the query method ensures that the LCD module has enough time to process internal data. When writing the source program, it is necessary to write the program according to the timing diagram of the LCD module. The timing of LM016L is shown in Figure 2.
According to the circuit diagram 1, define the pins: RS BIT P0.8; RW BIT P0.9; LCD E BIT P0.10.
The development environment of this design is Keil Uvision3. The program is roughly divided into three parts: initialization, control information and data transmission. The following will briefly explain it in conjunction with the program source code:
Generate a HEX file after compiling with Keil software. Open the lpc2138 chip property dialog box in Proteus, load the generated HEX file into it, and then run the simulation to see the result in Figure 3, indicating that the design is successful.
3 Conclusion
Proteus is used to simulate the ARM7+LM016L LCD module and display the string. Proteus provides a good software platform for ARM learning, allowing beginners to quickly master the core content of ARM without worrying about some details in circuit design. At the same time, this method does not require hardware resources, and it also opens up a best way for schools to offer ARM courses.
Previous article:Design of industrial coal composition analysis system based on S3C44B0X
Next article:Intelligent disinfection robot control system for livestock breeding based on ARM7
Recommended ReadingLatest update time:2024-11-16 20:29
- Popular Resources
- Popular amplifiers
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
- Do you know why UCC27211 needs an external Boot diode?
- Review summary: Zhongke Yihaiwei EQ6HL45 1V0 development board
- Implementation of Ethernet communication between TI C6678 DSP and PC
- Working principle of electronic tags
- Sell some idle SSDs Samsung 850 and 860evo
- 50Ω
- TI's Buck Converter Selection Reference Guide
- stm8
- Grab and run! EPOS implementation in unmanned retail stores
- EEWORLD University Hall----Introduction to Isolation Topology