

The area between the blue digital “steps” and the red line indicates an amount of distortion of the original signal. Looking at the two diagrams below we see a 3 bit digital representation of a sine wave. The act of converting an analog value to a digital representation is somewhat error prone, and the tradeoffs deal with just how much error we can tolerate. High resolution and high speed tends have higher cost. Enter the Analog to Digital Converter (ADC) with the ability to convert an external signal to a processor readable value.Ĭonverting analog to a digital format involves tradeoffs: how often you need to be updated as to the signal (sample rate), how much you need to know (resolution), and the cost (how much you have in your pocket). For example the output of a photocell, or a temperature sensor may use an analog voltage to indicate brightness or the temperature. Often the usefulness of a small microcontroller project depends on being able to interpret external signals in the form of voltage or less often, current.

That leaves us able to concentrate on the major role of a microcontroller: to interpret something about the environment, make decisions, and often output the result to energize a motor, LED, or some other twiddly bits. Nowadays the microcontroller has taken care of most of the system level needs with the luxury of built in RAM memory and the ability to upload our code. Simply put there were a lot of things we had to get working just so we could then read the state of an I/O port or a counter. Back in the day where the microprocessor was our standard building block, we tended to concentrate on computation and processing of data and not so much on I/O.
