ADC0808 which is an 8-bit resolution ADC has eight analog input pins to take inputs. The circuit uses a preset for providing the analog input. The clock for driving the ADC0808 is taken from the crystal of the . The controller AT89C51 uses a crystal of frequency 11.0592 MHz. As this frequency is too high for the ADC, it is divided using a D flip-flop and then given to the ADC0808. The circuit uses four D flip-flops by employing 74LS74
. It is a 14 pin IC with two internal D flip-flops. The circuit uses two ICs to divide the frequency by 16. The circuit diagram shows the connection of the D flip-flop ICs.
The output pins of the ADC are connected to the port P0 of the microcontroller. Pins ALE, OE, SC and EOC (pins 22, 9, 6 & 7 respectively) are connected to pins P1^0, P1^3, P1^1 & P1^2 of the microcontroller AT89C51
, respectively. Selector pins A, B and C (pins 25, 24, 23) of the ADC are connected to P2^4, P2^5 & P2^6 pins of controller.
The output from the ADC comes on port P0 and is stored into the SBUF register. This data is then transmitted serially to the serial port of the PC using the serial transmitter pin TxD (pin11) of the controller.
for hyper-terminal settings)