BASIC4MCU | 질문게시판 | 4개 led 주기가 서로 다른 점몀코드 질문이요
페이지 정보
작성자 비공개 작성일2018-06-08 00:21 조회4,547회 댓글0건
https://www.basic4mcu.com/bbs/board.php?bo_table=gac&wr_id=1579
본문
int main(void){
unsigned int count=0;
DDRA=0x0f;
DDRB=0x02;
while(1) {
if ((count % 200)==0)
PORTA=(PORTA ^ 1); // 반전
if ((count % 100)==0)
PORTA=(PORTA ^ 2);
if ((count % 50)==0)
PORTA=(PORTA ^ 4);
if ((count % 25)==0)
PORTA=(PORTA ^ 8);
_delay_ms(1);
count++; }}
이코드인데 if문 각 코드가 무엇을 의미하는지 잘 모르겠어요...
댓글 0
조회수 4,547등록된 댓글이 없습니다.