Pololu Robotics & Electronics
My account Comments or questions? About Pololu Contact Ordering information Distributors

Reading pulse width directly using timer?


I’m pouring over the CC2511 datasheet and I don’t see any timer capture ability, I only see output compare.

Is there a good way to capture pulse widths with nanosecond precision and accuracy?

The AVR family usually have an ICP pin, which when triggered, the timer count value is automatically saved by hardware without requiring an ISR. I am looking for the equivalent on the CC2511.

Obviously I can hook up a pin edge interrupt to manually copy the timer into RAM but I really want to avoid that.

Please advise




The CC2511’s Timer 1 has three capture channels. You can read more about them in section 12.6.4 of the CC2511 datasheet.

The timers and the CPU in the Wixel cannot operate any faster than 24 MHz, so you should not expect to have nanosecond accuracy.




Right… microseconds, not nanoseconds