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;
}
}
#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;
}
}
相关文章推荐
- javascript 学习(二) BOM & DOM
- www.centos.org
- 其实总归要面对,何不好好对待
- Handler 引起的内存泄露
- 这样读源码,不牛X也难
- 每日站立会议——20160425
- Unity学习笔记五 - Survival Shooter Tutorial
- javascript入门(一)
- VMware Player安装centos
- ossec开源ids
- 第一次冲刺阶段第七天
- 画图函数——点,线,矩形等等
- 大型分布式C++框架《四:netio之buffer管理器 下》
- 上周热点回顾(4.18-4.24)
- 站立会议07
- css的继承
- 第一冲刺阶段——个人工作总结08
- 第一冲刺阶段——站立会议第八天4月25日
- 数据结构1
- Swift快速入门之枚举与结构