I will make an alarm clock again when I have time. It feels very different from the ones I made before. In the past, I just copied it and made few changes myself. I always felt that the program was too long. When I designed the steps myself, the problems were not in this area. Although 51 is very familiar to many people, I think the algorithms are the same. It is very efficient to verify the algorithms on the familiar 51.
Function:
Ideas:
The procedure is as follows:
#include
#define uchar unsigned char
#define uint unsigned int
sbit beep=P3^1;
sbit led=P3^0;
sbit hour_key=P3^4;
sbit minu_key=P3^5;
sbit stopsounder_key=P3^3;
sbit mode_key=P3^7;
uchar mode_number;
uchar
uint a,b;
uchar hour0,sec0,
uchar code select[]={0x7f,0xbf,0xdf,0xef,0xf7,0xfb,0xfd,0xfe};
uchar code table[]=
void keyscan();
void init();
void delay(uchar z);
void display(uchar,uchar,uchar);
void
void init()
{
//
//
//
}
void delay(uchar z)
{
}
void ex0_int() interrupt 0
{
}
[page]
void keyscan()
{
}
void display(uchar hour,uchar minu,uchar sec)
{
}
void timer1_int() interrupt 3
{
}
void main()
{
}
Previous article:Pin description and off-chip bus structure of MCS-51 single-chip microcomputer
Next article:51 assembly instruction set
- Popular Resources
- Popular amplifiers
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
- 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
- DGUS implements Schneider PLC hardware and software connection guide
- Need a stereo audio amplifier circuit to replace TI's LM4666
- [Modelsim FAQ] Error loading design
- Principle of oscillometric blood pressure signal detection (a common method of measuring blood pressure)
- LDO problems found in AD2S1210 application
- German electrician VS Indian electrician, one has obsessive-compulsive disorder, the other drives the obsessive-compulsive disorder to death
- Newbies to power supplies, look here! Everything you want to know is here, and you will definitely gain something after reading this
- When you want to improve performance and reduce emissions, Allegro wants you to have the best of both worlds!
- Help, how to fix the low output of the boost circuit?
- A company's power supply interview questions, let's see how many you know? ?