Arbitrary function curves can be drawn when serial timing cannot read operations
//The program format is rough and there is no time to organize it. If you have any questions, please leave a message
. Complete source code download: http://www.51hei.com/f/12864c5.rar
//12864 serial timing implementation ///**************************************/ #include#include #include /******************************************/ #define uchar unsigned char #define uint unsigned int #define clear 0x01 //Clear screen #define reset_DDRAM 0x02 //DDRAM address reset #define left_move 0x04 //Move cursor left #define right_move 0x06 //Move cursor right #define all_left_move 0x05 //Move the entire screen to the left #define all_right_move 0x07 //Move the entire screen to the right #define display_left_move 0x10 //Display cursor moves left #define display_right_move 0x14 //Display cursor moves right #define set_function1 0x30 //Basic instruction set action #define set_CGRAM 0x40 //Set CGRAM address #define set_DDRAM 0x80 //Set DDRAM address #define set_function2 0x34 //Extended instruction set action #define fanbai 0x04 //Highlight the first line (expand the instruction set) #define set_GDRAM 0x80 //Set GDRAM address (expand instruction set) #define ON_G 0x36 //Turn on drawing display (expanded instruction set) #define set_function2 0x34 //Turn off the graphics display (expand the instruction set) //Port definition sbit LCD_CS=P1^3; sbit LCD_SID=P1^1; //Serial data line sbit LCD_SCLK=P1^2; //Serial clock input uchar code a[]={"QC12864"}; //Define the string to be displayed /******************************************/ //Delay function /******************************************/ void Delay_nms(uchar n) { uchar i; uchar j; for(i=0;i
Previous article:Wireless communication NRF24L01-receive
Next article:Development of a temperature controller for foot bath
Recommended ReadingLatest update time:2024-11-16 17:51
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
- What does the diode in this picture mean?
- After uploading the picture, it doesn't show up in the post when I refresh it. What's going on?
- 【GD32307E-START】04-Project establishment and LED lighting
- Design and implementation of ZigBee technology voice and image wireless monitoring system
- TIDA-00961 FAQ for GaN-based High Efficiency 1.6kW CrM Totem Pole PFC Reference Design
- [National Technology N32G457 Review] RT_Thread Studio SPI Filling the Pit
- LSM6DSRX iNEMO inertial module related information
- GD32E231 Keil development environment setup problem [solved! ]
- A datesheet output sensor, how to use 51 single chip microcomputer to read the data and process it
- How to find MSP430 program examples on TI's official website