Close

Sampling Fast Signals with an AVR... idea?

A project log for sdramThing4.5 "Logic Analyzer"

An AVR, 128MB SDRAM DIMM, old laptop LCD, and a handful of TTL chips -- 30+MS/s 32-channel logic-analyzer interface for an analog 'scope

eric-hertzEric Hertz 02/05/2015 at 02:200 Comments

I wrote this as a thought-process comment on a previous log-entry, but I think the explanation of my reasoning is useful as a full log-entry:

The idea is I've got a digital signal I need to sample (thankfully only *once*, but that shouldn't be a problem for other design-goals) that's *much faster* than the AVR's clock... The AVR runs at 1/8th or 1/16th the clock-frequency of the incoming signal. Can I connect that incoming signal *directly* to an AVR input, and reliably sample a *specific* bit in that bit-stream?

You see, I'm *really* trying not to have to insert buffers and latches and output-enables and direction-control for 17 bits. I don't know *why* exactly... I know it *can* be done, and *by me*. And, really, this whole project is so esoteric that my original goal of trying to do it *without* glue-logic--so less-experienced hobbiests/designers could make use of my findings--is kinda being defeated. OTOH, maybe not...


For instance, if I can rely on the AVR to sample a signal that's *synchronized* with its clock, but at a 8x-16x faster rate, then this opens up a whole world of possibilities...


Think about the use of multiple slow ADCs to sample a *fast* analog signal... This is not uncommon, though I can't recall its name, off hand. So, imagine you want to sample at 2x faster than a single ADC is capable... You just set two of the same ADCs to sample at their normal rate, but offset by half a clock-cycle. Want 16x the time-sampling-resolution, set up 16 ADCs to sample at their normal rate, each offset by 1/16th of a *single* ADC's sampling-cycle.


Or, if you know that the input signal *repeats* and you've got a reliable trigger, you can use *one* ADC to accomplish the same goal by sampling 16 "sweeps" of the signal, with a 1/16th sampling-rate offset each sweep.


So, if the AVR's *digital* input could be relied-on to be consistent, and with a very small "slew-rate" (for lack of a better word), then it could be entirely-possible to use an AVR (or several?) to sample *digital* data from a *much faster* source than the AVR's clock-frequency, without even needing external latches, etc.


Cool.

Discussions