1. Introduction
This circuit mainly consists of 51 single chip microcomputer, LCD1602 module, PCF8563 chip and buttons. The current time is displayed through LCD1062, and the time can be set by buttons.
2. Operation Effect
3. Partial Code
/*Want more projects private wo!!!*/
#include #include #define uchar unsigned char #define uint unsigned int void init() { flying number; lcden=0; write_com(0x38); //0011 1000B, function mode setting, set to 8 as data port, two-line display, 5*7 dot matrix write_com(0x0c); //0000 1011B, display on and cursor setting, display off, display cursor, cursor flashing write_com(0x06); //0000 0110B, display cursor movement setting, read or write a character, the address pointer decreases by one and the cursor decreases by one, write a character and the screen display does not move write_com(0x01); //0000 0001B, clear the display, data pointer and all displays write_com(0x80); //1000 000B, turn off display delay1602(5); write_com(0x80); //1000 000B, set to 2 lines display, write the address of the first line of characters, the first line address is 00-2F for(num=0;num<15;num++) { write_date(table[num]); //Write the first row of data delay1602(5); } write_com(0x80+0x40); //1100 0000B, set to 2 lines of display, write the address of the second line of characters, the address of the second line is 40-67 for(num=0;num<15;num++) //Write the second line of data { write_date(table1[num]); //Write the second row of data delay1602(5); } } /******************************************** Read time into internal buffer ---- external call ********************************************/ void P8563_gettime() { P8563_Read(); if(g8563_Store[0]==0) P8563_Read(); /*If seconds = 0, read again to prevent time changes*/ } //---Main function---// void main() { P8563_init(); heat(); while(1) { P8563_gettime(); BCD_16( ); display(); key_scan(); } }
Previous article:Single chip design of ultrasonic distance measurement simulation
Next article:Single chip microcomputer design to measure frequency
Recommended ReadingLatest update time:2024-11-16 15:35
- Popular Resources
- Popular amplifiers
- Wireless Sensor Network Technology and Applications (Edited by Mou Si, Yin Hong, and Su Xing)
- Modern Electronic Technology Training Course (Edited by Yao Youfeng)
- Modern arc welding power supply and its control
- Small AC Servo Motor Control Circuit Design (by Masaru Ishijima; translated by Xue Liang and Zhu Jianjun, by Masaru Ishijima, Xue Liang, and Zhu Jianjun)
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
- 【TI mmWave Radar Review】+3D Profile Test
- I thought it was washing the phone, but it turned out to be washing the phone
- Medium and low pressure MODS pipes
- EEWORLD University Hall----Live Replay: Microchip Security Series 14 - GoodLock with SAM L11 and TrustFLEX ATECC608 Security Devices
- 【ST NUCLEO-G071RB Review】_02_LED Light Experiment
- Help, MPU6050 freezes and no data output after running for a while
- TC58CVG0S3HxAIx Engineering Data Sheet
- How to overcome the huge source of electromagnetic interference in adjacent circuits
- A strange MIC (microphone) signal amplifier circuit, I thought about it for a long time but still couldn't understand it
- My Journey of MCU Development (Part 7)