51单片机程序——点阵显示汉字
时间:11-23
来源:互联网
点击:
#include
#define uint unsigned int
unsigned char code tab[]={0x7f,0xbf,0xdf,0xef,0xf7,0xfb,0xfd,0xfe};
unsigned char code digittab[]={0x14,0x18,0xff,0x18,0x14,0x18,0xff,0x18};
unsigned char code digittab1[]={0x54,0xff,0x54,0x3f,0x55,0xfd,0x55,0x1d}; //
unsigned char code digittab2[]={0x54,0x10,0x5a,0xf6,0x5f,0xf6,0x5a,0x12}; //
void delay(uint z)
{
uint x,y;
for(x=z;x>0;x--)
for(y=110;y>0;y--);
}
void main()
{
int i,t=50;
while(1)
{
while(t--)
{
for(i=0;i<8;i++)
{
P0=tab[i];
P1=digittab[i];
}
}
P0=0xff;
delay(100);
t=50;
while(t--)
{
for(i=0;i<8;i++)
{
P0=tab[i];
P1=digittab1[i];
}
}
P0=0xff;
delay(100);
t=50;
while(t--)
{
for(i=0;i<8;i++)
{
P0=tab[i];
P1=digittab2[i];
}
}
P0=0xff;
delay(100);
t=50;
}
}
51单片机点阵显示汉字程 相关文章:
- 51单片机驱动16乘16点阵显示汉字程序(11-30)
- Windows CE 进程、线程和内存管理(11-09)
- RedHatLinux新手入门教程(5)(11-12)
- uClinux介绍(11-09)
- openwebmailV1.60安装教学(11-12)
- Linux嵌入式系统开发平台选型探讨(11-09)