-
Category : MiddleWare
Tags :
- Update : 2012-11-26
- Size : 1kb
- Downloaded :0次
- Author :f****
- About :
Nobody
- PS : If download it fails, try it again. Download again for free!
Introduction - If you have any usage issues, please Google them yourself
#include<reg52.h>
#define uchar unsigned char
#define uint unsigned int
uchar code duma[]={0x3f,0x06,0x5b,0x4f,0x66,0x6d,0x7d,0x07,0x7f, //共阴的数码管段选.将值送给P2口
0x6f,0x77,0x7c,0x39,0x5e,0x79,0x71,0x40,0x80,0x00} //数值‘ 0-F - 熄灭
uchar code wema[]={0xf0,0xf1,0xf2,0xf3,0xf4,0xf5,0xf6,0xf7} //片选,1-8个数码管
void delay(uchar x)
{
uchar a,b
for(a=x a>0 a--)
for(b=50 b>0 b--)
}
void main()
{
uchar i
while(1)
{
for(i=0 i<8 i++)
{
P2=duma[i+1] //取值从 1 开始。
P1=wema[i]
delay(20)
}
}
}
Packet file list
(Preview for download)
LED02.c
Related instructions
- We are an exchange download platform that only provides communication channels. The downloaded content comes from the internet. Except for download issues, please Google on your own.
- The downloaded content is provided for members to upload. If it unintentionally infringes on your copyright, please contact us.
- Please use Winrar for decompression tools
- If download fail, Try it againg or Feedback to us.
- If downloaded content did not match the introduction, Feedback to us,Confirm and will be refund.
- Before downloading, you can inquire through the uploaded person information