Eric Smith wrote:
Keith M wrote:
My amiga disk reader doesn't sample at all.
I look for falling edges
of the pulses, clear a timer, look for the next edge, and calculate
the time difference between two pulses. The time between pulses
define the data, and I write out the associated data pattern to memory.
That's
still sampling. The time quantization is the resolution of the
timer.
Eric,
Thanks for the discussion.
I guess I've had some misconceptions and am trying to work them out.
When I think of sampling, I think of regularly recording the value of a
pin every so many units of time. So it's possible to miss
pulses/edges/etc if they happen to fall in between the samples.
Then I'm thinking of polling a pin where you do this sort of thing:
waitforlow: if pin != low then waitforlow
And then edge detection comes to mind, where polling or sampling could
potentially miss a very small pulse(perhaps a couple clocks wide) ---
edge detection would detect it.
My mind also goes to bit-banged UARTs for serial ports. Isn't there a
difference in implementation to a sampled-approach? Or is the
difference just that bit-banged ones sample once, and the other usually
samples multiple times?
I guess I see "sampling" as a repetitive based-on-clock behavior and
differentiate that from a one-time-read of a pin where the next read
isn't well-defined. Ie, the code path to the next read isn't
necessarily the same each time.
Does any of my ramblings make sense? Is it all just semantics?
Thanks
Keith