//Program function: Display two pictures on the 12864 LCD, one is a negative code picture and the other is a positive code picture
//
//
//
//
//It may be because the processing power of msp430g2553 is strong. I am now using serial connection to display the following pictures. The display effect is very good. I can't see any problem of slow data transmission speed.
//msp430g2553 has 16K flash and
#include
#include
#include
void
{
WDTCTL
BCSCTL1
DCOCTL
P2DIR
init_lcd();
//
//
//
//
//
//
//
//
//
//
//
//
//
//
}
//The function of this program is to display the graphics in negative code format and positive code format alternately and cyclically
// I wanted to achieve this effect by using the inverse method, but it didn't work. I guess it's because the inverse method can't inverse the entire screen at the same time.
8. OK, the above code is for msp430g2553 serial control of LCD, which can be used directly. If you understand the above code, you should have mastered the basic functions of LCD. Here are some commonly used display functions, which I often use, and they are very good:
////
{
}
//************************************************ *******************************************
{
uchar
a_SHOW[0]=(NUM/1000)+'0';//qian
a_SHOW[1]=(NUM/100)+'0'
a_SHOW[2]=(NUM/10)+'0';//show
a_SHOW[3]=NUM+'0';//ge
a_SHOW[4]='';
wr_string(x,y0,a_SHOW);
}
//************************************************ *******************************************
void
{
uchar
long
t=NUM*1000;
a_SHOW[0]=(t/10000)+'0';//show
a_SHOW[1]=(t/1000)+'0'
a_SHOW[2]='.';
a_SHOW[3]=(t/100)+'0';//shi
a_SHOW[4]=(t/10)+'0';
a_SHOW[5]=t+'0';
a_SHOW[6]='';
wr_string(x,y0,a_SHOW);
}
Well, let's stop here for the introduction of LCD. This is a rough introduction. If you want a more detailed introduction, you can refer to the LCD manual. However, if you understand the above procedures, you should have no problem with the general application of LCD.
The following is an introduction to the application of the modeling software used for LCD display images.
To use LCD to display pictures or character pictures, the data information of the picture must be required, and this data is often very large. So how to generate this huge data? It is too unrealistic to rely on us to write it manually. Then we need the help of modeling software. The software I used is PCtoLCD2002, the author is Chen Xinting. Thanks to the author for providing such a useful software.
This software is powerful and easy to use. Below I will introduce some of the functions I often use. For more detailed introduction, you can refer to other materials.
The following settings correspond to the ST7920 controller for 12864 LCD.
2) If you want to make a picture of text by yourself and then display it on LCD, in addition to making it directly in the character mode of PCtoLCD2002, you can also use the drawing accessories that come with Windows. The setting method is as follows:
1. Set the image resolution in the image properties: width to 128, height to 64, and other default values. Click OK.
2. Then you can add characters to the set drawing (click A on the left toolbar to add characters), write Chinese characters, and adjust the size, font and other properties of the characters. After that, save
3. Because PCtoLCD2002 only supports .bmp format images, you need to save them in .bmp format. (Usually save them in 24-bit
4. Then you can use the same method to take the model of the image to take the model of the character image you just created and saved.
Following the above method, you should be able to create your own picture and character picture data.
Well, above, I have given a relatively comprehensive but rather rough introduction to 12864. For more comprehensive and detailed usage, please refer to the data sheet. When using LCD or any other microcontroller or chip, the most detailed and authoritative information is always the corresponding data sheet.
All other information, no matter how detailed and rich it is, is based on the manual, so you must not rely on this information when using it, it can only be used as a reference. When you encounter a problem, read the manual more and think more, so that you can turn the knowledge into your own.
Use 12864 to display the curve graph in real time. I haven't made the demonstration animation yet. I will make it up after it is done. In fact, it should not be difficult if you have mastered the previous ones.
Previous article:My 12864 study notes_3---Control 12864 LCD display curve
Next article:12864 LCD in-depth study notes_1
- Popular Resources
- Popular amplifiers
- Learn ARM development(16)
- Learn ARM development(17)
- Learn ARM development(18)
- Embedded system debugging simulation tool
- A small question that has been bothering me recently has finally been solved~~
- Learn ARM development (1)
- Learn ARM development (2)
- Learn ARM development (4)
- Learn ARM development (6)
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- LED chemical incompatibility test to see which chemicals LEDs can be used with
- Application of ARM9 hardware coprocessor on WinCE embedded motherboard
- What are the key points for selecting rotor flowmeter?
- LM317 high power charger circuit
- A brief analysis of Embest's application and development of embedded medical devices
- Single-phase RC protection circuit
- stm32 PVD programmable voltage monitor
- Introduction and measurement of edge trigger and level trigger of 51 single chip microcomputer
- Improved design of Linux system software shell protection technology
- What to do if the ABB robot protection device stops
- Microchip Accelerates Real-Time Edge AI Deployment with NVIDIA Holoscan Platform
- Microchip Accelerates Real-Time Edge AI Deployment with NVIDIA Holoscan Platform
- Melexis launches ultra-low power automotive contactless micro-power switch chip
- Melexis launches ultra-low power automotive contactless micro-power switch chip
- Molex leverages SAP solutions to drive smart supply chain collaboration
- Pickering Launches New Future-Proof PXIe Single-Slot Controller for High-Performance Test and Measurement Applications
- Apple faces class action lawsuit from 40 million UK iCloud users, faces $27.6 billion in claims
- Apple faces class action lawsuit from 40 million UK iCloud users, faces $27.6 billion in claims
- The US asked TSMC to restrict the export of high-end chips, and the Ministry of Commerce responded
- The US asked TSMC to restrict the export of high-end chips, and the Ministry of Commerce responded
- Allwinner heterogeneous multi-core AI intelligent vision V853 development board evaluation - v853 YOLO v5 quantization -> installation of yoloV5
- [ST NUCLEO-U575ZI-Q Review] + Multi-channel ADC data acquisition
- Today's live broadcast: TI Matter solutions help smart home innovation
- Years of points exchanged for a watch
- e-Network Limited Time Benefits|"e-Select"-------Show Order
- Please advise on capacitor charging and discharging and parallel capacitor problems
- [ ST NUCLEO-U575ZI-Q Review] Share GPDMA information
- Raspberry Pi Official Manual 2023
- [Pingtouge Boliu BL606P audio and video development board] Unboxing and setting up the development environment HelloWorld
- TI enters the M0 MCU camp. What is it up to?