1. Features of LCD module:
EDM240128 graphic LCD is a 240*128 dot matrix LCD produced by Dalian Shenxun Information Co., Ltd. It has a built-in 8K data memory, and the LCD display control chip is T6963C produced by Toshiba. Its bus can be directly adapted to the MCS51 bus. It allows the single-chip microcomputer to access the display buffer at any time, and even perform bit operations to directly control a certain point. At the same time, this LCD also has the function of automatically adding/subtracting 1 to the read/write address, which provides convenience for the transmission programming of large amounts of data.
2. Hardware implementation:
Using the 89S52 single-chip microcomputer, which has an 8K FLASH ROM inside, the picture data and program to be displayed are directly stored in it, making the implementation of this circuit function very simple.
Figure 1 is the interface circuit between 89S52 and LCD display module in parallel mode.
P1.0 is connected to the reset of LCD, and VEE is used to adjust the grayscale of the display screen. The voltage range given in the manual is 8V~ -23V. It is found that the display color is too dark and cannot be seen clearly when it exceeds -15V. The actual test shows that the appropriate voltage range is -13.8V~-14.8V. Adjusting the voltage at this point can change the depth of the color of the characters and graphics on the display screen. Since the current at this point is extremely small, it can be adjusted with an ordinary potentiometer.
3. Extraction of image data
A dedicated program can be used to convert images into byte-type data. This article uses PICtoCODE [Image Data Generator] V1.0, designed by hy_zhangwang. This software can be downloaded for free from the Internet.
PICtoCODE can convert black and white monochrome images (supporting BMP, JPEG, JPG, GIF and other formats) into data files in A51, C51, HEX and other formats. The order of data generation is from top to bottom and from left to right. The upper left corner pixel corresponds to the first byte, and the lower right corner corresponds to the last byte. The software requires that the image width must be an integer multiple of 8. If the image width to be processed is not an integer multiple of 8, it is necessary to pre-process it with a graphics editing software (such as the drawing program that comes with the Windows system).
If the image is not a black and white monochrome image, you can use the "Color>>Black and White..." function to convert the image to a black and white image, and then export the data or code.
4. Software Design
The control instructions of EDM240128 can have two parameters, one parameter, or no parameters. Each instruction first enters the parameter and then the instruction code. If the number of parameters sent exceeds the specified number, the last one entered is valid. The status word must be checked before each operation. Because the status bit has different functions, different status bits should be checked when executing different instructions. The 240*128 points on the display, each 8 points is a byte of data, and they all correspond to the data in the display buffer one by one. One point corresponds to one bit, bit=1, the point displays a black dot, bit=0, the point disappears.
LCD has a display ON/OFF command. When display ON, the data in the display buffer corresponds to the display screen. When display OFF, the screen disappears, but the data in the buffer still exists and is not lost. For more information about the command, please refer to the T6963C user manual.
The software is written in C51, which greatly improves the development efficiency.
MCU program:
#define ming 0x4000 //Instruction port address
#define shuju 0x0000 //Data port address
#include
void delay(unsigned int i) //Delay
{/*-----------*/}
void writed(char a) //Write data subroutine
{/*----------*/}
void writec(char a) //Write instruction subroutine
{/*-----------*/}
void busy() //Judge whether the flag is busy
{*/-----------*/}
main()
{ unsigned char ji=0;
code char seg[3840]={/*-----------*/};///Picture data to be displayed
P1_0=0;
delay(100);
P1_0=1;
busy();
writed(0x00);
busy();
writec(0x24);
busy();
writec(0xb0); /////Set automatic writing, add one to the address
busy();
for(ji=0;ji<3840;ji++)
{ writed(seg[ji]);
busy();
}
writec(0xb3); // Automatic writing ends
busy();
writec(0x98); // Open display
//-----------------------------------
}
5. Conclusion
T6963C control chip is widely used in various graphic dot matrix LCDs. In addition to EDM240128 and EDM12864 graphic LCDs of Dalian Shenxun Company, OCM128*64, OCM240*128 of Jinpeng Okola Company, CA12864A of Shenzhen Songshan Company, and MPG240128A of Truly Company all use this chip. We can easily make various friendly human-machine interfaces.
Previous article:The realization of MP3 bus station announcer
Next article:Fast Algorithm for Binary-to-Decimal Conversion of 51 Single-Chip Microcomputer Integers
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
- Tank-1 test stand description (for burning and testing ESP8266 series)
- How to implement software reset and restart on HGI MCU
- Understanding digital signal processing
- [SAMR21 New Gameplay] 10. Serial Port Communication-3
- Can you give me an example of how to read the development board data in real time via TCP protocol on PC?
- AC7801 chip serial port printing problem
- I would like to ask you about the closed-loop control of the motor encoder
- How to protect privacy using Bluetooth
- Tesla Robot Optimus Prime Conference Uncut 4K HD First Episode
- O-RAN development trends, reference architecture, and interoperability testing