본문 바로가기

디지털회로/AT91SAM7S256

오늘 바꾼 TIMER / main 외 ULTRA main.c에 Timer_init0(TIMER_CLOCK5, 49, Mycounter); 추가 TIMER_CLOCK5 -> 4 TIMER.c에 void Timer_init0(unsigned int uiRate, unsigned int uiRc, void(*Handler)(void)) //TIMER_CLOCK5, 49, Mycounter volatile unsigned int ICNT; void Timer_init0(unsigned int uiRate, unsigned int uiRc, void(*Handler)(void)) //TIMER_CLOCK5, 49, Mycounter { PMC_PCER = (1 더보기
타이머카운터 TIMER.c #include "TIMER.h" volatile unsigned int ICNT; void Timer_init() { PMC_PCER = (1 더보기
AT91SAM7S256 <-> 하이퍼터미널 통신 PIOA.h #ifndef __PIOA_H__ #define __PIOA_H__ #define PIOA_PER (*(volatile unsigned int *)0xFFFFF400) // Pin enable #define PIOA_OER (*(volatile unsigned int *)0xFFFFF410) // output enable #define PIOA_PPUDR (*(volatile unsigned int *)0xFFFFF460) // pull-up resistance disable #define PIOA_CODR (*(volatile unsigned int *)0xFFFFF434) // 대입하면 0 - clear ouput data #define PIOA_SODR (*(volatile unsign.. 더보기
한글입력하기 #define PIOA_PER (*(volatile unsigned int *)0xFFFFF400) // Pin enable #define PIOA_OER (*(volatile unsigned int *)0xFFFFF410) // output enable #define PIOA_PPUDR (*(volatile unsigned int *)0xFFFFF460) // pull-up resistance disable #define PIOA_CODR (*(volatile unsigned int *)0xFFFFF434) // 대입하면 0 - clear ouput data #define PIOA_SODR (*(volatile unsigned int *)0xFFFFF430) // 대입하면 1 - set output d.. 더보기
AT91SAM7S256을 이용한 UART 통신설정 USART - 0 , 1 두개 외 DBGU(개발의 용이를 위해 하나 더 지원)로 3개 지원 - 시리얼 통신 -> PA9, PA10을 사용 UART 통신설정 PIOA.h #ifndef __PIOA_H__ #define __PIOA_H__ #define PIOA_PER (*(volatile unsigned int *)0xFFFFF400) // Pin enable #define PIOA_OER (*(volatile unsigned int *)0xFFFFF410) // output enable #define PIOA_PPUDR (*(volatile unsigned int *)0xFFFFF460) // pull-up resistance disable #define PIOA_CODR (*(volatile unsig.. 더보기