Because when writing to a 12874 LCD, the smallest unit of written data is also a hexadecimal number, which is 8 bits and can control 8 pixels. Therefore, when operating the LCD, the minimum number of pixels that can be controlled at one time is 8.
Therefore, if you want to control the on and off of a certain point in the liquid crystal, you must find a way to make the writing of the data of this point realized by writing this hexadecimal number, and the basic principle is that it cannot affect the state of the other 7 bits of data. Therefore, if you want to control a certain pixel point, you must first know the current data of the other 7 bits around this pixel point in the liquid crystal, and then add the data of this point bit by bit to this data, without affecting the state of the other 7 bits of data.
There are two ways to know the currently displayed data: 1. Implement the LCD read operation and read the corresponding data in GDRAM; 2. Artificially construct a virtual cache register (actually a two-dimensional array) to save the last written data of the LCD GDRAM, that is, the data currently displayed by the LCD. Because it saves 8-bit hexadecimal numbers, 128*64 pixels only need a 16*64 array to store them. Write the virtual register at the same time as writing 12864, and before writing, read the value of the virtual register and the point position, so as not to overwrite the previous point.
Because the IO pins of msp430g2553 are limited, my 12864 is connected in series. If it is connected in parallel,
//12864 serial connection
void
{ //
{
void
{
//
//
//
//
//
//
//
//
//
}
//The above two sentences specify the address. The following will read the current data first, and then write the new data
}
Using the above function, you can control the brightness of any pixel. With the above function, you can control the LCD to display any curve or image of any shape. Here is a function to display the coordinate axis. The function displays the X, Y coordinate axis on the LCD screen and divides the coordinate axis into segments of 10 points. The function is as follows:
To be continued...
Previous article:My 12864 study notes_4---A few additional explanations
Next article:12864 LCD In-depth Study Notes_2——Based on msp430g2553
- Popular Resources
- Popular amplifiers
- Naxin Micro and Xinxian jointly launched the NS800RT series of real-time control MCUs
- How to learn embedded systems based on ARM platform
- Summary of jffs2_scan_eraseblock issues
- Application of SPCOMM Control in Serial Communication of Delphi7.0
- Using TComm component to realize serial communication in Delphi environment
- Bar chart code for embedded development practices
- Embedded Development Learning (10)
- Embedded Development Learning (8)
- Embedded Development Learning (6)
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- Intel promotes AI with multi-dimensional efforts in technology, application, and ecology
- ChinaJoy Qualcomm Snapdragon Theme Pavilion takes you to experience the new changes in digital entertainment in the 5G era
- Infineon's latest generation IGBT technology platform enables precise control of speed and position
- Two test methods for LED lighting life
- Don't Let Lightning Induced Surges Scare You
- Application of brushless motor controller ML4425/4426
- Easy identification of LED power supply quality
- World's first integrated photovoltaic solar system completed in Israel
- Sliding window mean filter for avr microcontroller AD conversion
- What does call mean in the detailed explanation of ABB robot programming instructions?
- STMicroelectronics discloses its 2027-2028 financial model and path to achieve its 2030 goals
- 2024 China Automotive Charging and Battery Swapping Ecosystem Conference held in Taiyuan
- State-owned enterprises team up to invest in solid-state battery giant
- The evolution of electronic and electrical architecture is accelerating
- The first! National Automotive Chip Quality Inspection Center established
- BYD releases self-developed automotive chip using 4nm process, with a running score of up to 1.15 million
- GEODNET launches GEO-PULSE, a car GPS navigation device
- Should Chinese car companies develop their own high-computing chips?
- Infineon and Siemens combine embedded automotive software platform with microcontrollers to provide the necessary functions for next-generation SDVs
- Continental launches invisible biometric sensor display to monitor passengers' vital signs
- New infrared temperature measurement thermal imager is coming! AutoNavi holds a press conference in Beijing!
- Divide an assembly file into several assembly files. Compile prompt variable is not defined
- LT8918L: LVDS to 1-Port MIPI signal conversion chip solution introduction
- RF amplifier performance test
- External power supply energy efficiency limit value and energy saving evaluation value
- What kind of feedback is introduced in the following circuit?
- What is the significance of connecting two capacitors in series?
- PB50 High Voltage Power Boost Amplifier and Its Application
- Storage time of different surface treatment processes for circuit boards
- Microcontrollers that improve power efficiency in 8051 systems