当前位置:网站首页>[untitled] make a 0-99 counter, P1 7 connected to key, P2 connected to nixie tube section, common anode nixie tube, P3 0,P3. 1. Connect the nixie tube bit code. Each time you press the key, the nixie
[untitled] make a 0-99 counter, P1 7 connected to key, P2 connected to nixie tube section, common anode nixie tube, P3 0,P3. 1. Connect the nixie tube bit code. Each time you press the key, the nixie
2022-04-23 13:00:00 【ZLP~】
To make a 0-99 The counter of ,P1.7 Connect the button ,P2 Connected to nixie tube section , Common anode digital tube ,P3.0,P3.1 Connect the nixie tube bit code , Every time you press the key , Nixie tube display plus one . Please write down the of SCM C51 Code
#include "reg51.h"
#include "stdio.h"
sbit in1 = P1^7;
sbit lse1 = P3^0;
sbit lse2 = P3^1;
typedef unsigned int u16;
unsigned char code SMG_duanma[11] = {
0xc0,0xf9,0xa4,0xb0,0x99,0x92,0x82,0xf8,0x80,0x90,0xff};
void delay(u16 i)
{
while(i--);
}
void xianshi(int a,int b,int o)
{
P2=0xff;
lse1 =0;
lse2=1;
P2=SMG_duanma[a];
delay(1000);
P2=0xff;
if(o==1)
{
lse1 = 1;
lse2 = 0;
P2=SMG_duanma[b];
delay(1000);
}
P2=0xff;
}
void main()
{
int i=0;
int b=0;
int c=0;
while(1)
{
if(in1==0)
{
delay(100);
if(in1==0)
{
while(in1==0);
i=i+1;
while(in1!=0)
{
if(i<10)xianshi(i,0,0);
if(i>=10)xianshi(i%10,i/10,1);
if(in1==0)break;
}
P2=0xff;
}
}
}
}

If it's Miss Mei, the students should Function name Change it
版权声明
本文为[ZLP~]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204230613177252.html
边栏推荐
- [Blue Bridge Cup] April 17 provincial competition brushing training (the first three questions)
- Unlock openharmony technology day! The annual event is about to open!
- Softbank vision fund entered the Web3 security industry and led a new round of investment of US $60 million in certik
- Software testing weekly (issue 68): the best way to solve difficult problems is to wait and see the changes and push the boat with the current.
- Install nngraph
- Packet capturing and sorting -- TCP protocol [8]
- Fashion cloud learning - input attribute summary
- Date time type in database
- What are the forms of attack and tampering on the home page of the website
- Golang realizes regular matching: the password contains at least one digit, letter and special character, and the length is 8-16
猜你喜欢

Free and open source agricultural Internet of things cloud platform (version: 3.0.1)

云原生KubeSphere部署Redis

STM32 project transplantation: transplantation between chip projects of different models: Ze to C8

进程虚拟地址空间区域划分

1130 - host XXX is not allowed to connect to this MySQL server error in Navicat remote connection database

Redis deployment of cloud native kubesphere
![[Blue Bridge Cup] April 17 provincial competition brushing training (the first three questions)](/img/7d/23e2a611bc6a0d0239abdc79e2e8cf.png)
[Blue Bridge Cup] April 17 provincial competition brushing training (the first three questions)

31. 下一个排列

4. DRF permission & access frequency & filtering & sorting

拥抱机器视觉新蓝海,冀为好望开启数字经济发展新“冀”遇
随机推荐
SSM framework series - JUnit unit test optimization day2-3
Learning materials
Kubernets Getting started tutoriel
8 websites that should be known for product development to enhance work experience
Jiachen chapter Genesis "inner universe" joint Edition
Record a website for querying compatibility, string Replaceall() compatibility error
软件测试周刊(第68期):解决棘手问题的最上乘方法是:静观其变,顺水推舟。
Huawei cloud MVP email
ZigBee CC2530 minimum system and register configuration (1)
SSM框架系列——注解开发day2-2
How to prevent the website from being hacked and tampered with
Free and open source charging pile Internet of things cloud platform
[Blue Bridge Cup] April 17 provincial competition brushing training (the first three questions)
Golang implements a five insurance and one gold calculator with web interface
Introducing vant components on demand
Translation of multi modal visual tracking: review and empirical comparison
three.js文字模糊问题
Golang implements MD5, sha256 and bcrypt encryption
Van uploader upload picture implementation process, using native input to upload pictures
The project file '' has been renamed or is no longer in the solution, and the source control provider associated with the solution could not be found - two engineering problems