ChipCenter Questlink
SEARCH CHIPCENTER
Search Type:
Search for:




Knowledge Centers
Product Reviews
Data Sheets
Guides & Experts
News
International
Ask Us
Circuit Cellar Online
App Notes
NetSeminars
Careers
Resources
FAQ
EE Times Network
Electronics Group Sites


A to D and back to A again

What is 'A to D' conversion? Is it a religious experience? Is it the opposite of 'D to A' conversion? Well, 'A to D' is all about taking the real world and making it into ones and zeros so that digital technology can manipulate it. You can reasonably say that 'D to A' reverses the process. Today we will explore what this A to D to A is and what it is good for.

To get the gist of this, I think it will help if we review what A and D really are. First, A is for analog. What is analog? Is it just some ancient term lost in the world of today's 'digital engineers'? No, analog stands for a continuously variable signal. It means the item being measured can be chopped up into infinite little pieces over time. Say for example a signal changes from A to B over a 1 second interval. If you look at it before one second is over it will likely be somewhere between A and B. It is a continuous variable. No matter how small you slice up the time segments, there is still a signal with information there. The world as we perceive it is analog in nature. Colors blend infinitely from one end of the spectrum into the other. The sound as a car races by on the street is heard as a continuously increasing and then decreasing volume level. As you drive a car you continuously change speed in response to the traffic and environment around you. The world around you is analog.

So what is digital then? My computer is you say. Well yes, this is true, but let's get a little more basic though. Hold up one of the 'digits' on your hand. (That is your finger in case you were wondering) Now put it down, now put it up again, this is digital, it is either there, or it is not. I don't know if digit (as in finger) is where the term for digital came from, but it helps me remember what it means. So the simplest form of digital is 2 states. It's either there or not. But think about this a little deeper. What about the time it takes to change state? What if we look at our digital finger as it moves from all the way down to all the way up? If you look at it carefully, you see that a digital signal is really analog in nature. This is true. As one of my friends is fond of saying, "there is no such thing as digital really, just funny lookin' analog." So digital is really just a mode of perception. You look at something in a specifically determined time frame and define if it is there or if it is not. Digital is a predetermined definition of analog levels.

If digital is really analog in disguise, why even bother with it? Well, early on it was discovered that digital signals worked well in communication. Remember the telegraph? It used a digital dot or dash series to represent a letter. Why does it work well? Let's look at our digital finger signal example again. At a distance, it is obvious to the observer whether your finger is up or down. In fact this sort of signal is used on the freeway every day! All kidding aside, you can avoid communication errors by using digital signals for communication. So what is the drawback to using digital signals? The telegraph didn't last long, it was quickly replaced by analog forms of communication. It has to do with bandwidth (bandwidth is a measure of the amount of information a signal can carry). The analog signal can carry vast amounts of information. It can in fact have an infinite number of levels for a given signal range. Back to the finger example: If you have a good telescope and can focus in on the finger, you can easily see the varying levels that the finger can represent. The same thing can be accomplished without a telescope if you have very large finger. This implies that analog signals can represent large amounts of information much easier that digital signals can. To do this though, it's like Tim the tool man says, "You just need MORE POWER." If you can't get more power out of the signal, then noise, or other unwanted information can easily disrupt the signal. This is what happens when you get too far away from your favorite radio station and it starts to sound fuzzy. Sometimes you can give the receiver 'more power' with better filters and components. But overall, signal integrity is one of the struggles with analog systems.

To get a digital signal to move a lot of information, it has to work fast. When people wanted to hear each other talk it was much easier to use analog signals. The digital technology of the time just couldn't work fast enough to represent all the complexities of the audio information. Thus communication efforts focused on analog encoding and decoding of information for many years. But digital was being used in another domain entirely, in the application of Boolean logic. Digital signals could be used to represent Boolean statements. One level indicating 'true' and the other indicating 'false'. The computer was born. Things like if 'this is true' then do 'that' could now be executed by machines. Boolean logic is based on a digital representation of the world. Don't think that there are only digital computers though, for a while there were many analog computers in use to handle computations involving large amounts of information. Digital processing speeds eventually increased enough to take over these applications.

So we have analog.
The upsides are, it can represent lots of information, and the world around us can easily be represented by analog signals. The downsides are, it takes more power in either the transmitter or receiver to resolve the analog signals and small analog signals can be easily disrupted by outside influences.

Then there is digital.
The pros are low power transmission, and the ability to represent logic statements. The cons are information limits (low bandwidth) requiring it to work fast to process large pieces of information and the fact that the world around us is analog, not digital in nature.

Wouldn't it be great to have the best of both worlds? That's what engineers thought, so they coined a couple of acronyms to get the process started, ADC and DAC. The Analog to Digital Converter, and the Digital to Analog Converter.

What does the ADC do?
An analog signal is converted by chopping it up into chunks at predetermined time intervals. (This chopping is called the sample rate. The faster the sample rate, the higher the frequency that can be digitized.) Then the signal is measured at that point in time and assigned a digital value. Digital signals (often represented as 1 or 0) can be crammed together to indicate different levels of analog. One digit can indicate 2 levels. Now if you use a binary numbering system, the more digits you use, the number of levels goes up by 2 raised to the power of the number of digits. Four digits give you 16 levels (2^4). Eight digits gives you 256 levels (2^8). And so on. One common way of determining the level of a signal is to use a comparator.


Figure 1

Remember this application? In this case, the signal is compared to a reference voltage. You increase the reference voltage from min to max. When the signal is larger than the reference voltage, the op-amp comparator will output a high or a '1' When the reference voltage is the larger of the two, the output will be low, or a '0'. If the circuit knows the value of Vref at the time the output changes state, this is when Vref is approximately equal to Vsignal. I say approximately, because there is always a question of resolution. For more on this, read on.

What does DAC do?
So now we have a digital signal. We can do lots of fun things with it. We can transmit it, and manipulate it without worrying about signal loss. But what is next? Say we convert guitar music into digital format to add some neat sound effects. Well you can't just send the digital data back out to be heard. It must be converted back to analog. Why, because there are certain things we perceive well in an analog format. If you don't believe me go look at your speedometer, I'll bet it is an analog gauge. (There are some things we like to see digitally but usually that's so we don't have to deal with infinite increments.) To convert a digital signal back to analog, the circuit has to simulate the analog signal it represents. This always requires some kind of filtering. There are many ways to convert digital to analog. One of my favorites is by Pulse Width Modulation. In a PWM circuit, the output of the device switches on and off at a given frequency. The percent of time it is on versus of is the amount of analog signal it represents. This percentage is called the duty cycle.


Figure 2

The digital PWM is fed into a low pass filter that removes the switching frequency of the signal essentially leaving an analog signal. The amount of levels that this signal can represent depends on the resolution of the PWM signal. This means the capability of the PWM to be switched on and of at varying duty cycles. For example a PWM that could switch on and off in increments of 5% duty cycle would have less resolution than a circuit that can handle increments of 1% duty cycle. This means digital signals can only represent discrete levels of analog signal. These levels are the resolution of the signal.

Why is resolution so important? Well we stated above in the comparator example that the circuit knows what level Vref is at. How does it know that? It must generate it somehow. It does so with some type of DAC process. And the resolution of that DAC process will determine the resolution of the ADC process.

So there we are, we went from analog to digital and right back to analog again. It really is a circle. I will save more detail on ADC, and DAC circuits and examples for use in later articles. So long for now or should I say,

01010011 01101111 01101100 01101111 01101110 01100111,

01000100 01100001 01110010 01110010 01100101 01101110

Product Engineering Archive

Copyright © Chipcenter 1999

EE Center   Analog Avenue   PLD EDA Tools   PLD   DSP   EDA   Embedded Systems   Power   Test
Click here to get your listing up.

Copyright © 2003 ChipCenter-QuestLink
About ChipCenter-Questlink  Contact Us  Privacy Statement   Advertising Information  FAQ