本文包含原理图、PCB、源代码、封装库、中英文PDF等资源
您需要 登录 才可以下载或查看,没有账号?注册会员
×
loader.swf
(16.01 KB, 下载次数: 0)
实物制作可以看看我空间的照片
程序如下
#include<reg52.h>
unsigned char k,n,t;
unsigned long code ziku[]=
{0xDF,0xFF,0xAF,0xEF,0xB7,0xED,0xB0,0xED,0xB7,0xED,0x97,0xED,0xA7,0xED,0x37,0xC0,
0xFF,0xFF,0x01,0x00,0xFD,0xF7,0xBD,0xEF,0x4D,0xDF,0xF1,0xEE,0xFF,0xF1,0xFF,0xFF,
0xFF,0xBF,0x01,0x81,0xBD,0xBF,0x3D,0xC0,0xBD,0xDD,0x80,0xDD,0xED,0xFE,0xF7,0x00,
0x73,0xBD,0xA8,0xBD,0xDB,0xBD,0xAB,0xBD,0x73,0xBD,0x7B,0x00,0x7F,0xFD,0xFF,0xFF,
0xFF,0xBF,0x01,0x81,0xBD,0xBF,0x3D,0xC0,0xBD,0xDD,0x80,0xDD,0xED,0xFE,0xF7,0x00,
0x73,0xBD,0xA8,0xBD,0xDB,0xBD,0xAB,0xBD,0x73,0xBD,0x7B,0x00,0x7F,0xFD,0xFF,0xFF};
void delay(unsigned char t)
{ unsigned char a,b;
for(a=t;a>0;a--)
for(b=110;b>0;b--);
}
void main()
{
TMOD=0X01;
TH0=0XFC;
TL0=0X18;
EA=1;
ET0=1;
TR0=1;
}
void timer0() interrupt 1
{
TH0=0XFC;
TL0=0X18;
t++;
if(t==20)
{
t=0;
n+=2;
if(n==96)
{ n=0;
P2=ziku[n];
P3=ziku[n+1];
delay(2);
}
}
}
//P2=ziku[n];
// P3=ziku[n+1];
这两句就可以看出发光二极管怎么接的了,共阳,电路在脑子里就出来了,懒得画了!感谢大家的支持!!!
[ 此贴被zlulu2006在2009-06-20 11:22重新编辑 ] |