atmega128 인터럽트 예제
조회수 549회
define F_CPU 1600000000UL
include
include
include
void interrpt_init(void) { EICRA =0x03; EIMSK=0x01; DDRA =0x00;
SREG|=0x80;
} ISR(INT0_vect) {
PORTB=0x0f;
_delay_ms(1000);
} int main(void) {
interrpt_init();
DDRA=0xff;
PORTB=0x01;
PORTB=0x02;
PORTB=0x04;
}
교재의 예제인데 led가 출력이 안되요.. 뭐가 문제인걸까요?
-
(•́ ✖ •̀)
알 수 없는 사용자
댓글 입력