lcd1602头文件程序如下:
uchar xdata lcdwc _at_ 0xfceb; //命令写
uchar xdata lcdrc _at_ 0xfeeb; //命令读
uchar xdata lcdwd _at_ 0xfdeb; //数据写
uchar xdata lcdrd _at_ 0xffeb; //数据读
/*测忙信号*/
bit lcd_busy()
{
return (bit)(lcdrc&0x80);
}
/*写数据*/
void write_dat(uchar dat)
{
while(lcd_busy());
lcdwd=dat;
}
/*写命令*/
void write_cmd(uchar cmd)
{
while(lcd_busy());
lcdwc=cmd;
}
/*LCD初始化*/
void init_lcd()
{
write_cmd(0x38);
write_cmd(0x08);
write_cmd(0x0c);
write_cmd(0x06);
write_cmd(0x01);
}
void print(uchar *str)
{
while(*str!='\0')
{
write_dat(*str);
str++;
}
}
#endif //一定不能掉
求大虾帮忙解释下上面LCD是怎么定义的?
我打算用单片机和一块12864屏幕做一个简单的游戏机 在屏幕显示的方面要...
uchar xdata pictotal[1024];uchar code LCD_picture1[]={0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,...
如何用c语言编写8051单片机音乐程序
char code dx516[3] _at_ 0x003b;\/\/这是为了仿真设置的 sbit BEEP=P1^7; \/\/喇叭输出脚 sbit P10=P1^0;sbit K1= P3^2;sbit K2= P3^5;sbit K3= P2^4;sbit K4= P2^5;uchar th0_f; \/\/在中断中装载的T0的值高8位 uchar tl0_f; \/\/在中断中装载的T0的值低8位 \/\/T0的...
250分急求 AT89C51RC的头文件
Sbit (P3_3 , 0xB0, 3);Sbit (P3_2 , 0xB0, 2);Sbit (P3_1 , 0xB0, 1);Sbit (P3_0 , 0xB0, 0);Sbit (RD , 0xB0, 7);Sbit (WR , 0xB0, 6);Sbit (T1 , 0xB0, 5);Sbit (T0 , 0xB0, 4);Sbit (INT1 , 0xB0, 3);Sbit (INT0 , 0xB0, 2);Sbit (TXD , ...