The software has rich resources, including component resources: thousands of simulation devices such as digital and analog, AC and DC, and more than 30 component libraries; instrument resources include: oscilloscope, logic analyzer, virtual terminal, SPI debugger, I2C debugger, signal generator, pattern generator, AC and DC voltmeter, AC and DC ammeter, etc.
1 128×64 dot matrix LCD
Currently, the commonly used dot matrix LCDs are 122×32, 128×64, 240×320, etc. There are three controllers for dot matrix LCD screens, namely KS0108, T6963C and ST7920. The main differences between the three controllers are: KS0108 does not have any font library, T6963C has ASCII code, and ST7920 has a national standard secondary font library (more than 8,000 Chinese characters).
Proteus's device library provides a variety of LCDs. This article takes the LCD controlled by the KS0108 controller as an example to study the display of the screen. There are two models of 128×64 dot matrix LCD screens controlled by the KS0108 controller in Proteus: LGM12641BS1R, AMPIRE 128×64.
1.1 LCD pins and function introduction
The pins and function introduction of 128×64 dot matrix LCD LGM12641BS1R and AMPIRE 128×64 are shown in Table 1.
As can be seen from Table 1, the main difference between LGM12641BS1R and AMPIRE 128×64 is the screen selection signal control terminals CS1 and CS2. LGM12641BS1R is high level valid, while AMPIRE 128×64 is low level valid. 1.2 LCD read and write timing
As shown in Figure 1, when the enable terminal E is high level and R/W is low level, the data DB0~DB7 is written and latched; when the read operation is E high level and R/W is high level, the latched data is read out and sent to the display.
2 LCD simulation in Proteus
2.1 Hardware circuit diagram
During the simulation process, the single-chip microcomputer 89C52 is used as the main control unit. Since two screens are controlled at the same time, in order to avoid confusion in the connection, the connection node mode is adopted, and "line marks" are added on the connection lines for corresponding connections. The overall circuit diagram is shown in Figure 2.
Since the effective levels of the screen selection signal control terminals CS1 and CS2 of LGM12641BS1R and AMPIRE 128×64 are different, inverters are added to the chip selection control terminals CS1 and CS2 of AMPIRE 128×64 to achieve synchronous display of the two. 2.2 Simulation steps
Since the LCD is a dot matrix type, to display Chinese characters, an auxiliary Chinese character modeling tool must be used. The author chose "Tsinghua Pengyuan's LCD character library display program". Pay attention to the settings of related items when taking the model, otherwise it cannot be displayed normally. The settings are shown in Figure 3.
When taking the modulus, the vertical modulus is adopted, and the bytes are reversed. The display effect is shown in Figure 4.
2.3 Program debugging
The program is written in C51 and debugged with Keil (if it is a program written in assembly language, the compiler that comes with the Proteus software can also compile it without Keil). During the debugging process, there is an option of "Options for Target + project name" in the Project. Click "Output" and put a check mark in front of "Create HEX Fi" to indicate that it is selected. In this way, in the Proteus ISIS simulation environment, you can directly load the *.hex file generated in Keil for simulation demonstration.
3 Conclusion
Taking the two LCDs, LGM12641BS1R and AMPIRE 128×64, controlled by two KS0108 controllers driven by 89C52 as an example, the precautions for simulation and the effects of simulation are given. For the simplicity of the circuit, the node method is used for connection, and the line mark is added on the connection line to achieve the connection. Of course, the bus method can also be used. Proteus is widely used in the field of single-chip microcomputer simulation. It not only supports the 8051 series CPU model, but also supports the 68000, AVR, PIC12, PIC16, PIC18, Z80, HC11 and other series of single-chip microcomputers. It can also simulate analog circuits, digital circuits and mixed circuits of the two. Software simulation saves consumables, improves efficiency, simplifies the design process, and is worthy of widespread use.
Previous article:Principle and Application of SMD Photocoupler
Next article:Introduction to MR16 lighting system using LM3406 buck regulator
Recommended ReadingLatest update time:2024-11-16 22:33
- MathWorks and NXP Collaborate to Launch Model-Based Design Toolbox for Battery Management Systems
- STMicroelectronics' advanced galvanically isolated gate driver STGAP3S provides flexible protection for IGBTs and SiC MOSFETs
- New diaphragm-free solid-state lithium battery technology is launched: the distance between the positive and negative electrodes is less than 0.000001 meters
- [“Source” Observe the Autumn Series] Application and testing of the next generation of semiconductor gallium oxide device photodetectors
- 采用自主设计封装,绝缘电阻显著提高!ROHM开发出更高电压xEV系统的SiC肖特基势垒二极管
- Will GaN replace SiC? PI's disruptive 1700V InnoMux2 is here to demonstrate
- From Isolation to the Third and a Half Generation: Understanding Naxinwei's Gate Driver IC in One Article
- The appeal of 48 V technology: importance, benefits and key factors in system-level applications
- Important breakthrough in recycling of used lithium-ion batteries
- 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
- Pressure sensor problem
- [Popular Science] What is an attenuator? How to use an attenuator?
- Using FPGA to implement optimized fingerprint recognition preprocessing algorithm.pdf
- There is a new IoT product project that is about to be launched, but the definitions of the parameters of the Bluetooth chip NRF52832 are not yet clear,...
- MSP430 Series Embedded Experiment Tutorial---Basics
- Which of the current mainstream smart home wireless protocols is better?
- I heard that some people don’t understand flexible arrays?
- I have a question for you. I made a buck circuit, but the inductor whistles when it is loaded. What is the reason?
- [STM32WB55 review]——by freebsder
- DSP 28335