Inputcapture resolution

Discussion specific to the 24-pin ZX microcontrollers, e.g. ZX-24r, ZX-24s and ZX-24t.
Post Reply
FFMan
Posts: 502
Joined: 09 January 2010, 12:52 PM

Inputcapture resolution

Post by FFMan »

Further to my last post, I'm investigating why I appear to be getting discrepancies between reported and measured rpm.

So I have a scope hooked up the the car, and at approx 3000 i can measure the spark fire duration at 3.7ms and the gap between sparks as 17.2ms (its a 4 cycllinder,4 stroke with 2 coils, i'm only reading one)

The output from 1 sample of inputcapture at the same time looks like this:-

32458
5963

which i work out to 17.59 m/s and 3.23 m/s accordingly i.e. both a little long compared to the scope.

With timer1 speed set to 2 the count is of 542 nanosecond ticks I believe. Does this mean that there is resolution to 542 nanoseconds which would be ample or is there a minimum count interval ?

This is running on an old ZX24A as a task with little else going, Is there merit in changing it for a native mode device or putting the count in the main body of the code ?

thanks
Post Reply