Hi all,
Why is the damn capture module counting towards no end without a stop!?
It should count to 2200 according to my calculations!?
Why does it increment all the time?
int main (void)
{
unsigned long rising;
PINSEL0 = 0x00A50000; // set RX,TX and Capture on both CAP1,1 and CAP1,0
init_serial();
init_capture();
while (1)
{
rising = T1CR1;
printf("\r\nT1CR1=%lu",rising);
}
}
void init_capture ( void )
{
T1CCR = (1<<3); // Capture CAP1,1 Rising only...
T1PR = 0xF; // Pclk=15MHz, Pclk/15=1MHz=1uS
//time to capture is 455Hz so cycles should be 2,200
T1TCR = 2; // Reset counter...
T1TCR = 1; // Start the timer...
}Message
Capture problem - counting towards no end...
2005-02-26 by Lasse Madsen