BASIC4MCU | 질문게시판 | 답변 : atmega128 시리얼통신 질문
페이지 정보
작성자 master 작성일2019-06-10 09:46 조회3,388회 댓글0건
https://www.basic4mcu.com/bbs/board.php?bo_table=gac&wr_id=9290
본문
// MCU BASIC: https://www.basic4mcu.com// DateTime : 2019-06-10 오전 9:54:29// by Ok-Hyun Park//int main(void){uint8_t ch;uint32_t num=0;DDRA=0xff;PORTA=0;fnd_init();uart0_init();uart0_puts(" hello world \r\n");TCCR0=(1<<WGM01)|(1<<CS02)|(1<<CS00);OCR0=124;TIMSK=(1<<OCIE0);sei();while(1){ch=uart0_getch();if('0'<=ch&&ch<='9'){ch&=0x0f;num%=1000;num=num*10+ch;fnd_disp_num(num);}}}
댓글 0
조회수 3,388등록된 댓글이 없습니다.