Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 7

ADC Interfacing with 8051

ADC ARCHITECTURE

The ADC used in the interfacing is ADC 0808.

It has 28 pins, and can handle upto 8 analog signals using one chip.

It has got an 8-bit data output.

The 8 input channels are IN0-IN7, and

Vref(+)=5V; Vref(-) has been grounded.


ALGORITHM FOR PROGRAMMING ADC

i) An analog channel is selected by Channel addresses.

ii) ALE(Address Latch Enable) is activated by a low to high pulse in


order to latch in the address.

iii) SC(Start Conversion) is activated by a low to high pulse in order to


start the conversion.

iv) If a high to low output is obtained at EOC(End of Conversion), it


indicates that the data conversion is finished and the data is ready.

v) OE(Output Enable) is activated to read output data from the ADC


chip. In order to bring the digital data out of the chip a low to high
pulse is is given to the OE pin.
LCD Interfacing

When RS is low (0), the data is to be treated as a command. When RS


is high (1), the data being sent is considered as text data which
should be displayed on the screen.

When R/W is low (0), the information on the data bus is being
written to the LCD. When RW is high (1), the program is
effectively reading from the LCD. Most of the times there is no need
to read from the LCD so this line can directly be connected to Gnd
thus saving one controller line.

The ENABLE pin is used to latch the data present on the data pins. A
HIGH - LOW signal is required to latch the data. The LCD interprets
and executes our command at the instant the EN line is brought low.
If you never bring EN low, your instruction will never be executed.

Algorithm to send data to LCD:

1. Make R/W low

2. Make RS=0; if data byte is command

RS=1; if data byte is data (ASCII value)

3. Place data byte on data register

4. Pulse E (HIGH to LOW)


5. Repeat the steps to send another data byte

You might also like