30. Digital Electronics and Microcontrollers

Download the Notes

TOPIC 1:  Digital Electronics

Electronics are said to be digital when they deal only with on and off voltages.  This is different from analog because in analog systems signals can vary to any value between some minimum and maximum values.  As an example, the temperature in the room is an analog value because it can change and can have many values.  However, a light switch is either on or off, this is digital.

Oftentimes digital electronics will contain digital waveforms that consist of on and off changes with respect to time.  One example waveform is shown below. TOPIC 2:  Microcontrollers

A microcontroller is a digital device that can be programmed to make decisions and alter outputs based on its inputs.  It is traditionally a digital system but is often interfaced to the analog world.  These microcontrollers use a program that executes in a loop to complete a task.  Your dishwasher and washing machine along with your remote control and your cell phone are all controlled by a microcontroller.  It can be thought of as a mini computer all on a chip.

For example in order to run a very simple microwave, a microcontroller could have the following program.

TOPIC 3:  Mixed Signal Electronics

The digital devices we use must have a connection with the analog world we live in.  In between these two worlds are a set of electronics called mixed signal electronics.  They are called mixed signal because they include both digital and analog signals.  There are several common devices that exist in this area between the real world and the digital world.

A.  The Analog to Digital Converter (ADC or A/D) is a device that converts an analog, varying, voltage to a digital signal capable of being read by a computer or microcontroller.  An example is the AD7823 from Analog Devices, Inc.  Below is an image of the device from the AD7823 datasheet.

This chip has 8 pins as follows:

1.  CONVST is a pin used for a special power down mode so that the device consumes less power if it isn’t required all the time.

2-3.  VIN+ and VIN- are two pins between which your analog signal would be placed.  Many times your analog signal is a varying voltage with respect to ground.  In that case you would connect VIN- to ground but if your analog voltage is the voltage drop across a resistor then the VIN+ and VIN- would be placed on either side of the resistor.

4.  GND is the ground connection for the chip.

5.  VREF is the reference voltage.  It is the reference voltage that the device compares the input to when deciding its value.  The reference voltage also represents the highest voltage representable on the digital side.

6.  DOUT is the data out pin.  This is where the data is communicated to the computer or microcontroller from.

7.  SCLK is the clock pin.  Because the device is under the control of the microcontroller or computer it must be provided a clock signal so that the communications can “keep time” with the microcontroller.

The following equation characterizes the ADC.  If the ADC is referred to as an 8-bit ADC, it converts the analog voltage into an integer from 0 to 256 where 256 represents the reference voltage and 0 represents 0 volts.  If the ADC has a voltage reference of 5V and its input + voltage is 1.23 and the input – is connected to ground then the digital integer representing the input is 63.  63 represents 5 x (63/256) = 1.23046875 Volts.

B.  The Digital to Analog Converter (DAC or D/A) is a device that converts the digital signal from the computer or microcontroller to an analog signal that is useful in the analog world.  An example is the AD5300 from Analog Devices, Inc.  Below is an image from the AD5300 Datasheet.

The chip has 8 pins as follows:

1.  VDD is the power supply voltage.  On this device it can run from 2.7Vdc to 5.5Vdc.

2,3.  These pins aren’t used, NC means No Connection.

4.  VOUT is the analog output voltage.

5.  SYNC is a control input used to tell the device that an input is coming.

6.  SCLK is the clock signal so the computer or microcontroller can communicate accurately with the device.

7.  DIN is the data input connection.

8.  GND is the ground connection.

The following equation characterizes the DAC.  If the DAC is referred to as an 8-bit DAC, it converts the digital value into one of 256 voltages between 0 and VDD.  If the power supply voltage, VDD, is 3.3V and its digital input is 132, the output voltage is 1.7V.

In both the ADC and DAC the following number of bits are common: 8, 10, 12, 14, 16.  Above 16 and even up to 24 and beyond are typically used in high end, mission-critical type applications.

You should now be prepared to answer the following questions:

1.  Analog voltages vary but digital voltages are either _____ or ______.

2.  A microcontroller is a ___________ device that can be programmed to make decisions and alter outputs based on its inputs.

3.  The maximum power supply voltage the AD7823 can tolerate is ________.

4.  The input voltage to an 8-bit ADC is 1.05V and the voltage reference is 4V.  The VIN- is grounded.  What is the digital output value?

5.  The maximum power supply voltage the AD5300 can tolerate is ________.

6.  In the AD5300, if VDD =2.8V, bits=16, and DIN=46355, what is the output voltage?

7.  If an ADC has a digital output that is connected to a DAC input what is the percentage of error between the input to the ADC and the output of the DAC if the VDD and VREF voltages are 4.7V, VIN- is ground, both devices are 14-bit, and the input voltage to the ADC is 3.25V.


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: