文件名称:lesson6
-
所属分类:
- 标签属性:
- 上传时间:2016-12-09
-
文件大小:86.51kb
-
已下载:0次
-
提 供 者:
-
相关连接:无下载说明:别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容来自于网络,使用问题请自行百度
proteus单片机仿真-数码管(动态)
#include<reg51.H>
unsigned char code Tab[] {0xc0,0xf9,0xa4,0xb0,0x99,0x92,0x82,0xf8,0x80,0x90}
unsigned char Dat[] {0,0,0,0}
unsigned char tmp,i,j
unsigned char s 0
void delay(int n)
{
int i
for(i 0 i<n i++)
}
void main()
{
while(1)
{
s++
if(s>500)
s 0
Dat[0] s/100
Dat[1] s 100/10
Dat[2] s 10
tmp 0x01
for(i 0 i<3 i++)
{
P2 tmp
P0 Tab[Dat[i]]
tmp tmp<<1
delay(250)
}
for(i 0 i<150 i++)
for(j 0 j<100 j++)
delay(60000)
}
}-Proteus single-chip microcomputer simulation- digital tube (dynamic)
# include < reg51. H >
Unsigned char code Tab [] {xa4 xc0 0, 0 xf9, 0, 0 xb0, 0 x99, 0 x92, 0 x82, 0 xf8, 0 x80, 0 x90}
Unsigned char Dat [] ,0,0,0 {0}
Unsigned char TMP, I, j
Unsigned char s 0
Void delay (int n)
{
Int I
For (I 0 I < n i++)
}
Void main ()
{
While (1)
{
S++
If (s > 500).
S 0
Dat [0] s/100
Dat [1] s 100/10
Dat [2] s 10
TMP 0 x01
For (I 0 I < 3 i++)
{
The P2 TMP
P0 Tab [Dat [I]]
TMP TMP < < 1
Delay (250)
}
For (I 0 I < 150 i++)
For (j 0 j < 100 j++)
Delay (60000)
}
}
#include<reg51.H>
unsigned char code Tab[] {0xc0,0xf9,0xa4,0xb0,0x99,0x92,0x82,0xf8,0x80,0x90}
unsigned char Dat[] {0,0,0,0}
unsigned char tmp,i,j
unsigned char s 0
void delay(int n)
{
int i
for(i 0 i<n i++)
}
void main()
{
while(1)
{
s++
if(s>500)
s 0
Dat[0] s/100
Dat[1] s 100/10
Dat[2] s 10
tmp 0x01
for(i 0 i<3 i++)
{
P2 tmp
P0 Tab[Dat[i]]
tmp tmp<<1
delay(250)
}
for(i 0 i<150 i++)
for(j 0 j<100 j++)
delay(60000)
}
}-Proteus single-chip microcomputer simulation- digital tube (dynamic)
# include < reg51. H >
Unsigned char code Tab [] {xa4 xc0 0, 0 xf9, 0, 0 xb0, 0 x99, 0 x92, 0 x82, 0 xf8, 0 x80, 0 x90}
Unsigned char Dat [] ,0,0,0 {0}
Unsigned char TMP, I, j
Unsigned char s 0
Void delay (int n)
{
Int I
For (I 0 I < n i++)
}
Void main ()
{
While (1)
{
S++
If (s > 500).
S 0
Dat [0] s/100
Dat [1] s 100/10
Dat [2] s 10
TMP 0 x01
For (I 0 I < 3 i++)
{
The P2 TMP
P0 Tab [Dat [I]]
TMP TMP < < 1
Delay (250)
}
For (I 0 I < 150 i++)
For (j 0 j < 100 j++)
Delay (60000)
}
}
(系统自动生成,下载前可以参看下载内容)
下载文件列表
lesson6/
lesson6/lesson6.SEC
lesson6/lesson6_1
lesson6/lesson6_1.c
lesson6/lesson6_1.dsn
lesson6/lesson6_1.hex
lesson6/lesson6_1.lnp
lesson6/lesson6_1.LST
lesson6/lesson6_1.M51
lesson6/lesson6_1.OBJ
lesson6/lesson6_1.plg
lesson6/lesson6_1.PWI
lesson6/lesson6_1.uvopt
lesson6/lesson6_1.uvproj
lesson6/lesson6_1_uvproj.bak
lesson6/lesson6_2
lesson6/lesson6_2.c
lesson6/lesson6_2.dsn
lesson6/lesson6_2.hex
lesson6/lesson6_2.lnp
lesson6/lesson6_2.LST
lesson6/lesson6_2.M51
lesson6/lesson6_2.OBJ
lesson6/lesson6_2.plg
lesson6/lesson6_2.PWI
lesson6/lesson6_2.uvopt
lesson6/lesson6_2.uvproj
lesson6/lesson6_2_uvproj.bak
lesson6/lesson6_3
lesson6/lesson6_3.c
lesson6/lesson6_3.dsn
lesson6/lesson6_3.hex
lesson6/lesson6_3.lnp
lesson6/lesson6_3.LST
lesson6/lesson6_3.M51
lesson6/lesson6_3.OBJ
lesson6/lesson6_3.plg
lesson6/lesson6_3.PWI
lesson6/lesson6_3.uvopt
lesson6/lesson6_3.uvproj
lesson6/lesson6_3_uvopt.bak
lesson6/lesson6_3_uvproj.bak
lesson6/lesson6.SEC
lesson6/lesson6_1
lesson6/lesson6_1.c
lesson6/lesson6_1.dsn
lesson6/lesson6_1.hex
lesson6/lesson6_1.lnp
lesson6/lesson6_1.LST
lesson6/lesson6_1.M51
lesson6/lesson6_1.OBJ
lesson6/lesson6_1.plg
lesson6/lesson6_1.PWI
lesson6/lesson6_1.uvopt
lesson6/lesson6_1.uvproj
lesson6/lesson6_1_uvproj.bak
lesson6/lesson6_2
lesson6/lesson6_2.c
lesson6/lesson6_2.dsn
lesson6/lesson6_2.hex
lesson6/lesson6_2.lnp
lesson6/lesson6_2.LST
lesson6/lesson6_2.M51
lesson6/lesson6_2.OBJ
lesson6/lesson6_2.plg
lesson6/lesson6_2.PWI
lesson6/lesson6_2.uvopt
lesson6/lesson6_2.uvproj
lesson6/lesson6_2_uvproj.bak
lesson6/lesson6_3
lesson6/lesson6_3.c
lesson6/lesson6_3.dsn
lesson6/lesson6_3.hex
lesson6/lesson6_3.lnp
lesson6/lesson6_3.LST
lesson6/lesson6_3.M51
lesson6/lesson6_3.OBJ
lesson6/lesson6_3.plg
lesson6/lesson6_3.PWI
lesson6/lesson6_3.uvopt
lesson6/lesson6_3.uvproj
lesson6/lesson6_3_uvopt.bak
lesson6/lesson6_3_uvproj.bak
本网站为编程资源及源代码搜集、介绍的搜索网站,版权归原作者所有! 粤ICP备11031372号
1999-2046 搜珍网 All Rights Reserved.