Uploaded by João V


Interfacing ADC
What is ADC?
ADC – analog to digital conversion
 It converts the given analog value to a
digital value
 There are lot of digital ICs available to
convert analog to digital
 In microcontroller interfacing the
frequently used ICs are 0804 and 0808
0804 – an ADC
Interfacing ADC
Working of ADC
For every interfacing initialization is
 For ADC the initial values are
 INTR=1; // interrupt for completion of ADC
 rd=1;
// read from 0804
 wr=1;
// start conversion write..
Working of ADC contd.
Next step is to start the process of
converting analog voltage to digital data
 By changing the state of the write pin – a
transition from 0 to 1 will start the
 End of conversion will be acknowledged
by a change in the INTR state…
 See the timing diagram of the conversion
Timing diagram of START Conv.
Reading the data
To read the data from 0804 the read pin
state must be ‘0’.
 After reading the data read pin must be
change back into ‘1’
 The data obtained from the 0804 will be
from ‘0’ to ‘255’ , since the ADC is a 8 bit
adc and obtained value will be inbetween
20 to 28 .
Timing diagram of reading from
Convert analog and display in LCD
 Find the room temperature and display
the degree Celsius value in LCD.