Page 644 - 완) I MDP 프로젝트 작품 보고서(전체과 1학년)1.6
P. 644
if (mode==0)
{
instruction_write(0x80);
lcd_String("Hello Meister!");
instruction_write(0xC0);
lcd_String("WelCome P.S ");
}
else if (mode==1) TIMSK=0x01; //모드가 1이면 타이머카운트0 시작
else if (mode==2) //돈, 감사합니다 출력
{
TIMSK = 0x00;
instruction_write(0x80);
var(array_2);
instruction_write(0xC0);
lcd_String("Thank you ^3^ ");
}
else ;
}
}
interrupt [TIM0_OVF] void time(void)
{
cnt_time++; //real time 1초
TCNT0 = 131;
if (cnt_time==125)
{
cnt_time=0;
count_N(); //시간과 돈 카운트
count_P();
LCD_display(); //LCD display
- 637 -