728x90
반응형
#include "AT91SAM7S256.h"
#include "LED.h"
#define PICNT 20
void PIT_Init(void);
void ISR_System(void);
int main()
{
LED_Init();
LED_On();
// PIT_Init();
while (1)
{
}
return 0;
}
void PIT_Init(void)
{
AT91C_AIC_SVR[AT91C_ID_SYS] = (volatile unsigned int)ISR_System;
*AT91C_AIC_IECR = (1<<AT91C_ID_SYS);
*AT91C_PITC_PIMR = AT91C_PITC_PITEN | AT91C_PITC_PITIEN | 0xF4240;
}
//Interrupt Service Routine
void ISR_System(void)
{
if(*AT91C_PITC_PISR != 0)
{
if(0 == ((*AT91C_PITC_PIVR>>PICNT) % 3))
{
LED_Toggle();
}
}
}
728x90
'코스웨어 > 14년 스마트컨트롤러' 카테고리의 다른 글
ADS LED ON/OFF(PIT) 김진철 (0) | 2014.10.31 |
---|---|
일일보고서 손병규 - 20141030 (6) | 2014.10.31 |
10.30 이경진 led (0) | 2014.10.31 |
인터벌 타이머 김재성 (0) | 2014.10.31 |
ADS LED ON/OFF(PIT) 김화린 (0) | 2014.10.31 |
ADS LED ON/OFF(PIT) 문대영 (0) | 2014.10.31 |
ARM PIT 이용한 LED - 허수웅 (0) | 2014.10.31 |
ADS LED ON/OFF (0) | 2014.10.31 |