Page 64 - 완) I MDP 프로젝트 작품 보고서(전체과 1학년)1.6
P. 64
PORTB=PORTB^LCD_EN;
delay_ms(2);
}
void init_LCD(void) // LCD 설정
{
delay_ms(15);
LCD_cmd_write(0X38);
delay_ms(5);
LCD_cmd_write(0X38);
delay_ms(100);
LCD_cmd_write(0X38);
LCD_cmd_write(0X08);
LCD_cmd_write(0X01);
LCD_cmd_write(0X06);
LCD_cmd_write(0X0C);
}
void LCD_String(char flash str[])
{ char flash *pStr=0; //변수선언
pStr=str;
while (*pStr)LCD_data_write(*pStr++);
}
void init_system(void) //포트설정
{
DDRA=0xFF; // LCD표기부분
DDRB=0xFF; //enable, 명령어와 데이터
DDRE=0xFF; // 모터 출력
}
- 57 -