c언어(avr 관련) 프로그래밍..
아래 소스를 보고 흐름도(알고리즘)를 그려야 하는데
도와주세요ㅠㅠ 내공 드려요..
아래 사진은 참조입니다..
#include <avr/io.h>
#define sbi(sfr, bit) (_SFR_BYTE(sfr) |= _BV(bit))
#define cbi(sfr, bit) (_SFR_BYTE(sfr) &=~_BV(bit))
void Platforn _lnit(void){
DDRB = 0x0f ;
DDRE = 0x0c ;
DDRD = 0x30;
}
void delay(uint16_t ms){
uint16_t ;
for ( i= 1 ; i<ms ; i++);
}
int main (void){
Platforn _lnit();
while(1){
cbi(PORTE , 2);
cbi(PORTE , 3);
delay(50000);
sbi(PORTE , 2);
sbi(PORTE , 3);
delay(50000);
}
}
|