mazur (08.06.2013 20:20, просмотров: 8036)
Как мне правильно сделать? Выдает ошибку при компилировании. Ругается на LCD_DATA. "../LCD_4_PROBA.c:99:1: error: too few arguments to function 'lcd_send_byte'
"
void lcd_send_byte (u08 LCD_DATA)
{
DATA_DDR = (DATA_DDR | 0xF0);
setb(CMD_PORT, EN);
DATA_PORT = (DATA_PORT & 0x0F) | (LCD_DATA & 0xF0);
asm("nop");
asm("nop");
asm("nop");
asm("nop");
asm("nop");
clrb(CMD_PORT, EN);
asm("nop");
asm("nop");
asm("nop");
asm("nop");
asm("nop");
setb(CMD_PORT, EN);
DATA_PORT = (DATA_PORT & 0x0F) | (LCD_DATA << 4);
asm("nop");
asm("nop");
asm("nop");
asm("nop");
asm("nop");
clrb(CMD_PORT, EN);
asm("nop");
asm("nop");
asm("nop");
asm("nop");
asm("nop");
}
//========================================================================
void lcd_send_com (u08 LCD_DATA)
{
clrb(CMD_PORT, RS);
lcd_send_byte ();
lcd_io_in();
}
//========================================================================
//========================================================================
void Init_LCD (void)
{
_delay_ms(20);
lcd_send_com_nibble(0x30);
_delay_ms(5);
lcd_send_com_nibble(0x30);
_delay_ms(5);
lcd_send_com_nibble(0x30);
_delay_ms(5);
lcd_send_com_nibble(0x20);
_delay_us(50);
lcd_send_com_nibble(0x28);
_delay_us(50);
lcd_send_com(0x01);
_delay_ms(5);
lcd_send_com(0x06);
_delay_us(50);
lcd_send_com(0x0C);
_delay_us(50);
}
//========================================================================