- 博客(0)
- 资源 (6)
- 收藏
- 关注
12864 中文液晶显示2
一下是部分代码
/*================================函数声明==============================*/
/*写数据 */void WriteDataLCD(unsigned char WDLCD);
/*写指令 */void WriteCommandLCD(unsigned char WCLCD,BuysC);
/*读数据 */unsigned char ReadDataLCD(void);
/*检测忙 */unsigned char ReadStatusLCD(void);
/*初始化 */void LCDInit(void);
2011-09-11
4*4矩阵 89s51
初入门的学习 调试
void main()
{
int i,Key;
P2=0x00; //初始化LED灯
while(1) //开始循环扫描键盘
{
Key=Keyscan(); //调用键盘扫描子函数,获取键值
for(i=0;i<Key;i++) //根据键值,控制LED闪烁的次数
{
P2=0xfe; //点亮LED
Delay();
P2=0xff; //熄灭LED
Delay();
}
Key=0; //键值归零
}
}
2011-05-05
protues元件库中英文对照表
protues元件库中英文对照表,对初学者找不到元件的很有用~
元件名称 中文名 说明
7407 驱动门
1N914 二极管
74Ls00 与非门
74LS04 非门
74LS08 与门
74LS390 TTL 双十进制计数器
7SEG 4针BCD-LED 输出从0-9 对应于4根线的BCD码
2010-05-22
c51红绿灯示例程序下载
红绿灯的模拟程序 可用于初学者调试观察 while(1)
{
P10=1;P15=1; //东西:红,南北:绿
while(sum<10)
{
while(!flag)
flag=0;
sum++;
}
sum=0;
P15=0;
P14=1;
while(sum<3)
{
while(!flag)
flag=0;
sum++;
}
sum=0;
P14=0;P10=0;P12=1;
while(sum<8)
{
while(!flag)
flag=0;
sum++;
}
P12=0;P11=1;
while(sum<3)
{
while(!flag);
flag=0;
sum++;
}
sum=0;
P11=0;
2010-05-09
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人