Page 14 - 완) I MDP 프로젝트 작품 보고서(전체과 1학년)1.6
P. 14
EICRB = 0b00001010;
EIMSK = 0b00110000;
TIMSK = 0x01;
TCNT0 = 0x00;
TCCR0 = 0x07;
}
four = (count/1000) % 10;
three = (count/100) % 10;
two = (count/10) % 10;
one = (count/1) % 10;
stwo = (time/10)%10;
sone = (time/1)%10;
PORTF = 0x80|four;
delay_ms(2);
PORTF = 0x40|three;
delay_ms(2);
PORTF = 0x20|two;
delay_ms(2);
PORTF = 0x10|one;
delay_ms(2);
PORTD = 0x20|stwo;
delay_ms(2);
PORTD = 0x10|sone;
delay_ms(2);
if (time==0) {SREG = 0;
PORTG=0x01;
}
}
- 7 -