Interfacing ADC0808 with microcontroller 8051
Contributor:Udit Chandra, Bhavnagar, India
ADC0808 is one of the useful chips from National Semiconductor. See in figure given aside. In lot of embedded systems micro controllers needs to take analog input. Most of the sensors AND transducers such as temperature, humidity, pressure, are analog. For interfacing these sensors to micro controllers we require to convert the analog output of these sensors to digital so that the controller can read it. Some micro controllers have built in Analog to Digital Converter (ADC) so there is no need of external ADC. For controllers that don’t have internal ADC external ADC is used.
One of the most commonly used ADC is ADC0808. ADC 0808 is a Successive approximation type with 8 channels i.e. it can directly access 8 single ended analog signals. ADC0808 has an 8-bit data output just like the ADC804. The 8 analog input channels are multiplexed and selected according to table given below I/O pins using three address pins A, B, and C.
In the ADC0808, Vref(+) and Vref(-) set the reference voltage. If Vref(-)=Gnd and Vref(+)=5V, the step size is 5V/256 = 19.53mV. Therefore, to get a 10mV step size we need to set Vref(+)=2.56V and Vref(-)=Gnd. From figure given below of ADC0808, notice the ALE pins. We use A, B, and C addresses to select IN0 – IN7, and activate ALE to latch in the address. SC is for the start conversion. SC is same as the WR pin in other ADC chips. EOC is for end-of-conversion, and OE is for output enable (READ). The EOC and OE are the same as the INTR and RD pins respectively.
This Code is only visible to Registered users. Please Login/Register