[an error occurred while processing this directive]
|
int main(void)
{
IODIR = 0x00000004;
VPBDIV = 2;// Pclk íà 30 Mhz
PINSEL0_bit.P0_2 = 2;// òàéìåð 0 (Cap1)
T0PR = 0x0000001E; //Load prescaler
T0TCR = 0x00000002; //Reset counter and prescaler
T0CCR = 0x00000005; //enable timer
T0TCR = 0x00000001; //enable timer
VICVectAddr4 = (unsigned)T0isr; //Set the timer ISR vector address
VICVectCntl4 = 0x00000024; //Set channel
VICIntEnable |= 0x00000010; //Enable the interrupt
__enable_interrupt();
while(1);
}