본문 바로가기
코스웨어/16년 스마트컨트롤러

20160310_업무일지_정우민_펌웨어실습

by 알 수 없는 사용자 2016. 3. 16.
728x90
반응형


펌웨어실습



#define DDRA       (*((volatile unsigned char *)0x21))         // 위표의 주소값
#define PINA        (*((volatile unsigned char *)0x20))
#define PORTA    (*((volatile unsigned char *)0x22))


int main(void)
{
     volatile unsigned long uiCnt;                                        // volatile :  휘발성의
 
     DDRA=0xff;
 
     while(1)
{
      for(uiCnt=0 ; 100000>uiCnt ; ++uiCnt);                    // 시간지연
      PORTA=0x08;                                                       
      for(uiCnt=0 ; 100000>uiCnt ; ++uiCnt);
      PORTA=0x40;
 }
 return 0;
}


728x90