BASIC4MCU | 질문게시판 | 답변 : 스위치 눌렀다떼면 동작 질문
페이지 정보
작성자 master 작성일2020-01-22 11:13 조회6,330회 댓글1건
https://www.basic4mcu.com/bbs/board.php?bo_table=gac&wr_id=11542
본문
// MCU BASIC: https://www.basic4mcu.com// DateTime : 2020-01-22 오전 11:15:04// by Ok-Hyun Park//#define F_CPU 16000000L#include <avr/io.h>#include <avr/interrupt.h>//int count=1000;//ISR(TIMER0_OVF_vect){if((PINE&4)==0){ count=0; PORTB=1; }//if(count<1000){if(++count>=1000){ PORTB=0; }}}//int main(void){DDRB=0x07;TCCR0=0x04; TIMSK=1<<TOIE0; //분주비 64 설정sei();while(1);return 0;}
댓글 1
조회수 6,330전자학습자님의 댓글
전자학습자 작성일감사합니다