LAB 10 Interfacing Adc809 To The 8051 Trainer

Download as doc, pdf, or txt
Download as doc, pdf, or txt
You are on page 1of 3

LAB 10

INTERFACING ADC809 TO THE 8051 TRAINER


OBJECTIVE:
 To interface an ADC809 to the 8051.

REFERENCES:
 Mazidi and Mazidi, “The 8051 Microcontroller and Embedded Systems,” Chapter 12.
 www.national.com/catalog/AnalogDataAquisition.html

MATERIALS:
 8051 assembler and trainer
 ADC808/809
 TTL square wave and TTL square wave clock source

ACTIVITY 1
In many applications we need to have multiple analog-to-digital
converters. The ADC808/809 is a single chip that can accommodate up to 8
analog inputs. These 8 inputs are called channels and each is selected by an
address. Read about this chip in Chapter 12 and also download the data
sheets from the www.national.com web site.
Connect the ADC808/809 to the 8051 and write a program to display
data input from at least two of the channels. Each channel can be connected
to separate potentiometers to examine the data displayed.
Notice that the ADC output is between 0 to FFH where FFH is for a
full-scale input. However, this must be converted to decimal and then to
ASCII in order to be displayed on the LCD. As you change the
potentiometers, the output should change, indicating the value of the
analog input.
For the clock source of the ADC808/809, you can either use an
external clock source (square wave TTL), which is preferable, or use the
XTAL frequency from the 8051 XTAL as shown in Chapter 12 for the
ADC804. Make sure that you use at least three or four D flip-flops to bring
down the frequency.

Notice the following points when interfacing the 8051 to the


ADC808/809.
1. The ADC808/809 clock frequency is between 10 kHz and 1250 kHz and
must be a
minimum of 3V peak.
2. The minimum pulse width for ALE = 200 µ sec and OE = 250 µsec.
3. Read data from the ADC808/809 and follow these steps.
(a) Select the channel.
(b) Activate START (200 µsec).
(c) Poll EOC for high.
Lab Manual for “The 8051 Microcontroller and Embedded Systems” LAB
10
LAB 10
WORKSHEET
(d) Send low to OE (for a minimum of 250 µsec).
(e) Read the data from the data pin.

Thank you to John Maddux for his input on this lab.

Name: Date: Class:

1. Indicate the direction of pins ALE, SC, EOC, and OE from the point of view
of the
ADC808/809.

2. Give the steps for converting data and getting the data out of the
ADC809. State the status
of the SC and EOC pins in each step.

3. Give the role of signals ALE, A, B, and C in selecting the ADC channel.

4. In the ADC809 assume that Vref is connected to 2.56 V. Find the


following.
(a) step size
(b) maximum range for Vin
(c) D7 - D0 values if Vin = 1.2 V
(d) Vin if D7 - D0 = 11111111
(e) Vin if D7 - D0 = 10011100

5. In the ADC809 assume that Vref is connected to 5V. Find the following.
(a) step size
(b) maximum range for Vin
(c) D7 - D0 values if Vin = 2.7 V
(d) Vin if D7 - D0 = 11111111
LAB 10 Lab Manual for “The 8051 Microcontroller and Embedded
Systems”
LAB 10
INTERFACING ADC809 TO THE 8051 TRAINER
(e) Vin if D7 – D0 = 11011101

6. In connecting ADC808/809 to an 8051, indicate the direction of pins ALE,


SC, EOC,
and OE from the point of view of the 8051.

Lab Manual for “The 8051 Microcontroller and Embedded Systems” LAB
10

You might also like