当前位置:网站首页>[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
边栏推荐
- 将opencv 图片转换为字节的方式
- 世界读书日:我想推荐这几本书
- Wu Enda's programming assignment - logistic regression with a neural network mindset
- melt reshape decast 长数据短数据 长短转化 数据清洗 行列转化
- mysql支持ip访问
- Learning materials
- Use of Presto date function
- Aviation core technology sharing | overview of safety characteristics of acm32 MCU
- Image attribute of input: type attribute of fashion cloud learning -h5
- Translation of multi modal visual tracking: review and empirical comparison
猜你喜欢
如何实现点击一下物体播放一次动画
4. DRF permission & access frequency & filtering & sorting
The accuracy and speed are perfectly balanced, and the latest image segmentation SOTA model is released!!!
SSM框架系列——Junit单元测试优化day2-3
风尚云网学习-h5的input:type属性的image属性
Record a website for querying compatibility, string Replaceall() compatibility error
【蓝桥杯】4月17日省赛刷题训练(前3道题)
Unlock openharmony technology day! The annual event is about to open!
Pytorch: a pit about the implementation of gradreverselayer
Image attribute of input: type attribute of fashion cloud learning -h5
随机推荐
mysql支持ip访问
About the 'enum' enumeration type and structure.
Summary of JVM knowledge points - continuously updated
Go language mapping operation
World Book Day: I'd like to recommend these books
unity常见的问题(一)
[daily question] chessboard question
Byte warehouse intern interview SQL questions
Connect orcale
Important knowledge of transport layer (interview, retest, final)
Remote sensing image classification and recognition system based on convolutional neural network
Ad20 supplementary note 3 - shortcut key + continuous update
Go iris framework implements multi service Demo: start (listen to port 8084) service 2 through the interface in service 1 (listen to port 8083)
Proteus 8.10 installation problem (personal test is stable and does not flash back!)
Trier les principales utilisations de l'Agent IP réseau
Kubernetes 入門教程
MySQL —— 16、索引的数据结构
Importerror after tensorflow installation: DLL load failed: the specified module cannot be found, and the domestic installation is slow
Homomorphic encryption technology learning
Introduction to servlet listener & filter