void init_port()
{
DDRB = 0xff;
PORTB = 0xff;
LCD_RS_DDR |= LCD_RS;
LCD_RW_DDR |= LCD_RW;
LCD_EN_DDR |= LCD_EN;
LCD_DATA_DDR |= LCD_DATA;
}
void LCD_init()
{
LCD_write_command(0x28);
//LCD_en_write();
//delay_nus(50);
//LCD_write_command(0x28);
//LCD_write_command(0x0c);
//LCD_write_command(0x01);
//delay_nms(5);
}
void LCD_write_command(uchar command)
{
delay_nus(20);
LCD_RS_PORT &= ~LCD_RS;
LCD_RW_PORT &= ~LCD_RW;
//LCD_DATA_PORT &= 0x0f;
//LCD_DATA_PORT |= command&0xf0;
//LCD_en_write();
//command = command < <4;
//LCD_DATA_PORT &= 0x0f;
//LCD_DATA_PORT |= command&0xf0;
//LCD_en_write();
}
void main()
{
init_port();
LCD_init();
//INT_init();
//timer1_init();
//LCD_write_string(0,0,dis1);
//LCD_write_string(0,1,dis2);
//forward();
while(1);
//{
// LCD_write_char(3,1,bai1);
// LCD_write_char(4,1,shi1);
// LCD_write_char(5,1,ge1);
// LCD_write_char(9,1,bai2);
// LCD_write_char(10,1,shi2);
// LCD_write_char(11,1,ge2);
// delay_nms(200);
//}
}