On 15/06/10 02:43, Chuck Guzis wrote:
Phil, this thing seems to pay attention to the
duration of the read
pulse, instead of the edge. Do I read this right?
No -- the hardware only stores "time since last edge". So the edges are
always one "virtual nanosecond" wide. The code extends these to two PLL
clock cycles for the DPLL counter reset, and also stores whether there
was a data pulse (transition) in the current data window.
You could feed the DiscFerret a 5ms long pulse if you liked, the counter
would just keep going and the next time the counter was latched into RAM
you'd get a reading of 5ms + time_inactive. That is, the time from
transition edge to transition edge.
Let's say you have this input:
a b
------+ +----------+ +--------
| | | |
| | | |
+---+ +-----+
The data in buf[] is just the time from a to b -- the duty cycle can
vary as much as you like, and because T(a-b) is still the same, you'll
get the same timing value.
--
Phil.
classiccmp at philpem.me.uk
http://www.philpem.me.uk/