问题描述:
C程序 while (--a!=0)是什么意思
void LCM1602_TestBusy(void)
{
LCM_Dat_Port = 0xFF;
LCM1602_RS = 0;
LCM1602_RW = 1;
LCM1602_EN = 1;
while (LCM1602_Busy);
LCM1602_EN = 0;
}
void LCM1602_WriteCMD(uchar dat)
{
LCM1602_TestBusy();
LCM1602_RS = 0;
LCM1602_RW = 0;
LCM_Dat_Port = dat;
LCM1602_EN = 1;
LCM1602_EN = 0;
}
void LCM1602_WriteDATA(uchar dat)
{
LCM1602_TestBusy();
LCM1602_RS = 1;
LCM1602_RW = 0;
LCM_Dat_Port = dat;
LCM1602_EN = 1;
LCM1602_EN = 0;
}
void LCM1602_init()
{
LCM1602_WriteCMD(0x38);
LCM1602_WriteCMD(0x0c);
LCM1602_WriteCMD(0x06);
LCM1602_WriteCMD(0x01);
}void LCD_set_xy(unsigned char x,unsigned char y)
{
unsigned char address;
if(y == LINE1)
address = LINE1_HEAD + x;
else
address = LINE2_HEAD + x;
LCM1602_WriteCMD(address);
}
void LCD_write_char( unsigned x,unsigned char y,unsigned char dat)
{
LCD_set_xy(x,y);
LCM1602_WriteDATA(dat);
}
帮我翻译一下,发到我邮箱627080161@qq.com 谢谢
void LCM1602_TestBusy(void)
{
LCM_Dat_Port = 0xFF;
LCM1602_RS = 0;
LCM1602_RW = 1;
LCM1602_EN = 1;
while (LCM1602_Busy);
LCM1602_EN = 0;
}
void LCM1602_WriteCMD(uchar dat)
{
LCM1602_TestBusy();
LCM1602_RS = 0;
LCM1602_RW = 0;
LCM_Dat_Port = dat;
LCM1602_EN = 1;
LCM1602_EN = 0;
}
void LCM1602_WriteDATA(uchar dat)
{
LCM1602_TestBusy();
LCM1602_RS = 1;
LCM1602_RW = 0;
LCM_Dat_Port = dat;
LCM1602_EN = 1;
LCM1602_EN = 0;
}
void LCM1602_init()
{
LCM1602_WriteCMD(0x38);
LCM1602_WriteCMD(0x0c);
LCM1602_WriteCMD(0x06);
LCM1602_WriteCMD(0x01);
}void LCD_set_xy(unsigned char x,unsigned char y)
{
unsigned char address;
if(y == LINE1)
address = LINE1_HEAD + x;
else
address = LINE2_HEAD + x;
LCM1602_WriteCMD(address);
}
void LCD_write_char( unsigned x,unsigned char y,unsigned char dat)
{
LCD_set_xy(x,y);
LCM1602_WriteDATA(dat);
}
帮我翻译一下,发到我邮箱627080161@qq.com 谢谢
问题解答:
我来补答展开全文阅读