MX7219控制led显示c程序
时间:11-23
来源:互联网
点击:
.h>
#include
typedef unsigned char uchar;
sbit din=P1^0;
sbit clk=P1^1;
sbit load=P1^2;
void send(uchar add,uchar dat)
{
uchar ads,i,j;
load=0;
i=0;
while(i<16){
if(i<8) ads=add;
else ads=dat;
clk=0;
for(j=8;j>=1;j--)
{
din=ads&0x80;
ads=ads<1;
clk=1;
clk=0;
}
i=i+8;
}
load=1;
}
void main()
{
send(0x0c,0x01);
send(0x0b,0x07);
send(0x0a,0xf5);
send(0x09,0x00);
while(1){
send(0x01,0x77);
send(0x02,0x1f);
send(0x03,0x4e);
send(0x04,0x3d);
send(0x05,0x4f);
send(0x06,0x47);
send(0x07,0x3b);
send(0x08,0x3b);
}
MX7219控制led显示c程 相关文章:
- Windows CE 进程、线程和内存管理(11-09)
- RedHatLinux新手入门教程(5)(11-12)
- uClinux介绍(11-09)
- openwebmailV1.60安装教学(11-12)
- Linux嵌入式系统开发平台选型探讨(11-09)
- Windows CE 进程、线程和内存管理(二)(11-09)