Page 17 - 완) I MDP 프로젝트 작품 보고서(전체과 1학년)1.6
P. 17
DDRD = 0x00;
DDRA = 0xff;
DDRE = 0x00;
DDRB = 0xFF;
DDRF = 0xff;
PORTF = 0x00;
TIMSK = 0x01;
TCNT0=0x00;
TCCR0=0x07;
EIMSK = 0xff;
EICRA = 0b10101010;
EICRB = 0b10101010;
SREG |= 0x80;
}
void main(void)
{
init_system();
while (1)
{
timer_sec();
score();
}
//카운트 시작
interrupt [EXT_INT1] void bbb(void){if(PORTF==0x01) Flag_catch+=100;}
interrupt [EXT_INT2] void ccc(void){if(PORTF==0x02) Flag_catch+=100;}
interrupt [EXT_INT3] void ddd(void){if(PORTF==0x04) Flag_catch+=100;}
interrupt [EXT_INT4] void eee(void){if(PORTF==0x10) Flag_catch+=100;}
interrupt [EXT_INT5] void fff(void){if(PORTF==0x20) Flag_catch+=100;}
interrupt [EXT_INT6] void ggg(void){if(PORTF==0x40) Flag_catch+=100;}
- 10 -