#include
#define uchar unsigned char
#define uint unsigned int
sbit lcden=P3^7;
sbit led=P3^6;
sbit lcdrs=P3^5;
uchar num;
uchar code table[]="I LIKE MCU!";
void delay(uint i)
{
uchar j;
for(;i>0;i--)
for(j=110;j>0;j--);
}
void write_1602com(uchar com)
{
lcdrs=0;
P0=com;
delay(5);
lcden=1;
delay(5);
lcden=0;
}
void write_1602(uchar date)
{
lcdrs=1;
P0=date;
delay(5);
lcden=1;
delay(5);
lcden=0;
}
void init_1602()
{
lcden=0;
write_1602com(0x38);
write_1602com(0x0e);
write_1602com(0x06);
write_1602com(0x01);
write_1602com(0x80+0x10);
}
void main()
{
init_1602();
for(num=0;num<11;num++)
{
}
while(1);
}
Previous article:msp430 lcd screen 1602 driver
Next article:Flowing Light-Timer Delay
Recommended ReadingLatest update time:2024-11-17 10:37
- Popular Resources
- Popular amplifiers
- Single-chip microcomputer C language programming and simulation
- 100 Examples of Microcontroller C Language Applications (with CD-ROM, 3rd Edition) (Wang Huiliang, Wang Dongfeng, Dong Guanqiang)
- Principles and Applications of Single Chip Microcomputers and C51 Programming (3rd Edition) (Xie Weicheng, Yang Jiaguo)
- Teach you to learn 51 single chip microcomputer-C language version (Second Edition) (Song Xuefeng)
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
- New breakthrough! Ultra-fast memory accelerates Intel Xeon 6-core processors
- New breakthrough! Ultra-fast memory accelerates Intel Xeon 6-core processors
- Consolidating vRAN sites onto a single server helps operators reduce total cost of ownership
- Consolidating vRAN sites onto a single server helps operators reduce total cost of ownership
- 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!
- Playing with Zynq Serial 31——[ex53] EMIO control based on Zynq PS
- Great! Tektronix oscilloscopes have been completely upgraded, come and unlock them! If you don't read it, you will miss out on 100 million!
- TMS320C6000 Basic Learning (3)——CCS v5 Software Development Environment Construction
- Microcontrollers: The Basics
- Improvement of RC series-parallel frequency-selective network oscillator in El experimental box
- Texas Instruments helps you solve the three most common problems in high-speed amplifier design!
- LNA [Low Noise Amplifier Practical Application Case]——[qorvo-TQL9092]
- 【Home Smart Dashboard】 Development and Construction of ESP-IDF under Linux
- Solutions to security issues in RF systems and Wi-Fi networks
- [ESP32-S2-Kaluga-1 Review] 2. LCD display pictures