Here are a few early schematic diagrams:
Here is the source code of the microcontroller:
#include
shi=dsf; // Send points to display
if(dsf==16)
{
shi=0;
dsf=0;
}
while(!key2);
temp1=2;
temp5=1;
num2=dsf;
temp6=2;
temp7=2;
temp8=2;
}
break;
}
switch (temp2)
{
case 1:
if(key3==0)
{
ledf=1;
ledt=1;
ledx=1;
leds=0;
jdq=0;
ledg= 1;
ledb=1;
dss++;
shi=dss;
if(dss==16)
{
shi=0;
dss=0;
}
while(!key3);
temp2=2;
temp6=1;
num4=dss;
temp5=2 ;
temp7=2;
temp8=2;
}
break;
}
switch (temp3)
{
case 1:
if(key4==0)
{
ledf=1;
leds=1;
ledx=1;
ledt=0;
jdq=0;
ledg=1;
ledb=1;
dst++;
shi=dst;
if(dst==16)
{
shi=0;
dst=0;
}
while(!key4);
temp3=2;
temp7=1;
num5=dst;
temp5=2;
temp6=2;
temp8=2;
}
break;
}
switch (temp4)
{
case 1:
if(key5==0)
{
ledf=1;
leds=1;
ledt=1;
ledx=0;
jdq=0;
ledg=1;
ledb=1;
dsx++;
shi=dsx;
if(dsx==16)
{
shi=0;
dsx=0 ;
}
while(!key5);
temp4=2;
temp8=1;
num6=dsx;
temp5=2;
temp6=2;
temp7=2;
}
break;
}
switch (temp5)
{
case 1:
if(num==3686)
{
num=0;
ledg=~ledg;
num1++;
}
if(num1==60)
{
num1=0;
num2--;
shi=num2;
if(num2==0)
{
jdq=1;
TR0=0;
}
}
break;
}
switch (temp6)
{
case 1:
if(num==3686)
{
num=0;
ledg=~ledg;
num1++;
}
if(num1==60)
{
num1=0;
ledb=~ledb;
num3++;
if( num3==60)
{
num3=0;
num4--;
shi=num4;
}
if(num4==0)
{
jdq=1;
TR0=0;
}
}
break;
}
switch (temp7)
{
case 1:
if( num==3686)
{
num=0;
ledg=~ledg;
num1++;
}
if(num1==60)
{
num1=0;
ledb=~ledb;
num3++;
if(num3==1440)
{
num3=0;
num5 --;
shi=num5;
}
if(num5==0)
{
jdq=1;
TR0=0;
}
}
break;
}
switch (temp8)
{
case 1:
if(num==3686)
{
num=0;
ledg=~ledg;
num1++;
}
if(num1==60)
{
num1=0;
ledb =~ledb;
num3++;
if(num3==10080)
{
num3=0;
num6--;
shi=num6;
}
if(num6==0)
{
jdq=1;
TR0=0;
}
}
break;
}
}
void main()
{
TMOD=0x02;
TH0=6;
TL0=6;
EA=1;
ET0=1;
jdq=0;
while(1)
{
keyscan();
display(shi);
while(jdq==1&&P2== 0xC0)
{
fmq=0;
ledg=1;
ledb=1;
}
}
}
void T0_time()interrupt 1
{
num++;
}
Download the full code: http://www.51hei.com/f/ledccr.rar
This is the circuit diagram drawn by the perforated board drawing software:
Previous article:stc89c52+18b20 complete temperature collection together
Next article:Single chip 4-digit digital tube electronic clock
- Popular Resources
- Popular amplifiers
- Learn ARM development(16)
- Learn ARM development(17)
- Learn ARM development(18)
- Embedded system debugging simulation tool
- A small question that has been bothering me recently has finally been solved~~
- Learn ARM development (1)
- Learn ARM development (2)
- Learn ARM development (4)
- Learn ARM development (6)
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
- Analysis of the application of several common contact parts in high-voltage connectors of new energy vehicles
- Wiring harness durability test and contact voltage drop test method
- From probes to power supplies, Tektronix is leading the way in comprehensive innovation in power electronics testing
- From probes to power supplies, Tektronix is leading the way in comprehensive innovation in power electronics testing
- Sn-doped CuO nanostructure-based ethanol gas sensor for real-time drunk driving detection in vehicles
- Design considerations for automotive battery wiring harness
- Do you know all the various motors commonly used in automotive electronics?
- What are the functions of the Internet of Vehicles? What are the uses and benefits of the Internet of Vehicles?
- Power Inverter - A critical safety system for electric vehicles
- Analysis of the information security mechanism of AUTOSAR, the automotive embedded software framework
- Can the highest main frequency of DSP be obtained from the chip model?
- Qualcomm launches next-generation cellular chipsets designed for the Internet of Things
- The ultimate PCB material for entry-level nanny
- After the zstack coordinator is powered off and restarted, the node cannot access the network?
- High-performance lossless data decompression IP based on LZO
- Newcomer Report
- Benefits of IoT
- Application suggestions for 2.1GHz and 3.5GHz frequency bands in 5G networks
- 【NUCLEO-WL55JC2 Review】Summary
- Flathead RVB2601 LED light