Asynchronous counter for DAC input

adccounterripple-counter

Is it OK to use an asynchronous counter for DAC input? If I understand it correctly, the output pins on the counter do not change simultaneously with the clock? Does the latency for every higher bit adds up? In other words, going from 0 to 1 takes the same time as going from let's say 999 to 1000?

My system is 8 bit, but I need to create a sawtooth-looking rapm of 10bit increments. Instead of using two ports, I want to clock an external counter using only one bit. The counter, in turn, will advance every clock cycle, and provide the DAC with 1LSB higher input.

The word asynchronous worries me because if bits have different delays, the transition between powers of 2 can have some intermediate values. For example, going from 7 to 8 would look like 0111 -> 1000. If the bits do not flip simultaneously, the transition could look like this, for example: 0111 -> 0110 -> 01010 -> 1000. Is this how it works? The transitions might have some intermediate/indeterminate state?

Best Answer

In an asynchronous counter the carry ripples through, and the outputs will not change at exactly the same time.. the time increases as the significance of the bits increases.

So, if you go from 01....1 to 10...0, the outputs might go 01....10, 01...100, ... 00...0, 10...0.

If you have a synchronous counter, the outputs will change at (almost) exactly the same time (a short time after the active clock edge). There might be a small amount of skew, because not everything in the paths will be identical.

If you add a latch to an asynchronous counter, the output will change as with the synchronous counter, but one clock later.

Even with inputs changing perfectly, it's not unusual to see some fairly large glitches at the output of a DAC, especially at transitions like 011..0 to 10...0. Sometimes a low pass filter cleans it up enough, other times an analog S&H or blanking might be necessary to tame the glitch energy.

Edit: Taking @gwideman's suggestion to look at the 4040 datasheet, you can see the ripple times:

enter image description here

So, at 5V supply, it would typically take 180ns for the LS bit to change, and between zero and 1.3usec additionally for rest of the the outputs to settle down (depending on which ones change).

If you were to use a triplet of 74HC161s (4-bit synchronous counters), there is not a specific guarantee of how synchronous the outputs are, but you might guess they'd be within 10% of the propagation delay (WAG) if similarly loaded.

enter image description here

So, perhaps within a few ns typically. BTW, a 74HC4040 would be quite a bit better than a CD4040 so it's not totally a fair comparison.