The actual picture of the basketball counter is as follows:
The schematic diagram and PCB diagram drawn by Altium Designer are as follows:
The simulation schematic is as follows
The microcontroller source program is as follows:
#include #include #define uchar unsigned char #define uint unsigned int #define out P0 sbit RS=P2^0; sbit RW=P2^1; sbit E=P2^2; void lcd_initial(void); void check_busy(void); void write_command(uchar com); void write_data(uchar dat); void string(flyer name ,flyer *s); void delay(uint); flying i; void main(void) { lcd_initial(); while(1) { write_command(0x06); string(0x82,"Name:HONG JIE"); write_command(0x04); string(0xce,"987654321:QQ"); for(i=0;i<40;i++) { write_command(0x1c); delay(50); } } } void delay(uint j) { fly i=250; for(;j>0;j--) { while(--i); i=249; while(--i); i=250; } } void check_busy(void) { flying dt; do { dt=0xff; E=0; RS=0; RW=1; E=1; dt=out; }while(dt&0x80); E=0; } void write_command(uchar com) { check_busy(); E=0; RS=0; RW=0; out=com; E=1; _nop_(); E=0; delay(1); } void write_data(uchar data) { check_busy(); E=0; RS=1; RW=0; out=that; E=1; _nop_(); E=0; delay(1); } void lcd_initial(void) { write_command(0x38); write_command(0x0c); write_command(0x06); write_command(0x01); delay(1); } void string(float name, float *s) { write_command(ad); while(*s>0) { write_data(*s++); delay(100); } }
Previous article:51 Learning process - Chapter 2 The use of keil software and running lights
Next article:51 MCU fan driver source program
Recommended ReadingLatest update time:2024-11-16 14:51
- Popular Resources
- Popular amplifiers
- Siemens PLC Programming Technology and Application Cases (Edited by Liu Zhenquan, Wang Hanzhi, Yang Kun, etc.)
- 西门子S7-12001500 PLC SCL语言编程从入门到精通 (北岛李工)
- Siemens Motion Control Technology and Engineering Applications (Tongxue, edited by Wu Xiaojun)
- Implementing a Deep Learning Framework with Python (Zhang Juefei, Chen Zhen)
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
- MicroPython driver porting for LIS2DW12 motion sensor
- What is the relationship between the machine cycle and clock cycle of RH850?
- Inductor Current Measurement in Switching Power Supplies
- Share my fish farming process
- Let's unbox the LAUNCHXL-F28379D
- 【McQueen Trial】Python Programming (1)
- 9 tests and methods that must be performed on switching power supplies
- This week's topic: Let's talk about PID and share your experience. Two pieces of exquisite PID materials are included
- Shanghai is urgently recruiting FPGA development engineers with generous benefits! ! ! !
- Motor control circuit, MOS burnt out