#include
***it RS=P3^5;
***it RW=P3^6;
***it E=P3^4;
unsigned char LCD[]={"I LOVE YOU "};
void delay(unsigned char j)
{
while(j--);
}
void zhilin(unsigned char z)
{
E=0;
RS=0;
RW=0;
P0=z;
E=1;
delay(1);
E=0;
}
void shuju(unsigned char J)
{
E=0;
RS=1;
RW=0;
P0=J;
E=1;
delay(1);
E=0;
}
void init()
{
// zhilin(0X38);
// zhilin(0xc0);
zhilin(0X0c);
zhilin(0x06);
}
void main()
{
char i ;
init();
for(i=0;i<16;i++)
{
shuju(LCD);
delay(1);
}
while(1);
}
1
|
|
|
|
happyzhmab 发表于 2012-3-1 09:47 ![]()
算你哼啦,给你啦
呵呵! 新手!
|
|
|
|
|
zhihuizhou 发表于 2012-3-1 12:05 ![]()
张小盒 iloveyou
汗!
|
|
|
|
|