您的位置:首页 > 其它

MBI5024驱动程序

2016-04-25 07:19 253 查看
16-Bit LED显示驱动芯片驱动程序MBI5024驱动程序,MBI5026驱动程序,MBI5024C语言驱动程序。

#include<reg52.h>

sbit MBI_SDI = P0^1;

sbit MBI_CLK = P0^0;

sbit MBI_OE = P0^2;

sbit MBI_LE = P0^3;

void delay(unsigned int i)

{

while(i>0)i--;

}

void wr5024byte(unsigned int dat)

{

unsigned char i;

for(i=0;i<16;i++)

{

MBI_SDI=(dat &0x8000)?1:0;

MBI_CLK=1;

dat<<=1;

MBI_CLK=0;

}

MBI_LE = 1;

delay(100);

MBI_LE = 0;

}

void main()

{

MBI_CLK = 0;

MBI_SDI = 0;

for(;;)

{

wr5024byte(0x5555);

delay(1000);

MBI_OE = 0;

delay(1000);

MBI_OE = 1;

}

}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: