void wrdat (unsigned char data)
{ unsigned char temp=0;
while (read_ac() & 0x80); // test busy flag.
lcd_rw = 0;NOP(); //RW=0
lcd_rs = 1;NOP(); //RS=1
temp = (data>>4) & 0X0F; //右移高4位到低4位,屏蔽高4位
PORTC = temp | (PORTC & 0XF0); //读RC高4位数据与数据低4位送入RC
lcd_e = 1;NOP(); //E=1
lcd_e = 0;NOP(); //E=0
PORTC = (data & 0X0F) | (PORTC & 0XF0); //送低4位数据到RC低4位
lcd_e = 1;NOP(); //E=1
lcd_e = 0;NOP(); //E=0
}
出现如下提示,请教坛友碰到吗?如何解决这个问题
warning: implicit conversion loses integer precision: 'int' to 'unsigned char'
|