I want to count external pulses on my LPC 1768 board using any of the 4 Timer/Counters. I am configuring all teh registers but its working in timer mode only but not taking input pulse on one of the capture input. can any body give working code for this.
Regards,
vinay
Well, as far as I know there are no mind readers here. Post your code using the proper tags (note: using the proper tags - read the posting instructions!)
PINCON->PINSEL3|=(3<<20) // PIN SELECT FOR CAP0.0 TIM0->TCR = 2; //RESET the timer TIM0->CTCR = 1; // CTCR I have configured as counter for CAP0.0 for Timer 0 TIMO->CCR = 0; TIM0->TCR = 1; // Enabling the timer
Counter_Value = TIM0->TC;
i am reading Counter_Value.
by doing this my TC register is counting PCLK instaed of External Clock. is there any mistake in the above code.
Vinay
I'm giving up. It's hopeless. Not being to read a manual or program is one thing, but not being able to understand fundamental requests in English is another...
View all questions in Keil forum