Continue to Site

Welcome to

Welcome to our site! is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

[SOLVED] ADC0809 not working with 8051

Not open for further replies.


Advanced Member level 1
Mar 12, 2015
Reaction score
Trophy points
Activity points
Hi everyone,

I'm using ADC0809 along with 8051 controller. The analog input for ADC is fed through voltage divider circuit with one resistor as a variable one and another as a fixed one. The input voltage is varied through variable resistor. The clock for ADC is supplied through 555 astable multivibrator. I'm monitoring SOC , ALE and clock signals using controller. Now problem is I'm not getting constant data from ADC even though there is no varaition from ADC input. Most of the times I'm getting the FF as the data from ADC. I even tried by varying the clock frequency from 3KHz to 300KHz its of no use the problem still persists. Not sure about the controller code because I have not written it. Tried a lot but the problem I'm facing for seriously very long time.
Please suggest what should be the actual clock frequency.
As I want to measure the unknown resistance value from the field I have used voltage divider circuit to read and calculate it. This signal is converted to 0 to 5 volts through instrumentation amplifier which made using opamps. The output of INA is applied to the ADC.

Please someone guide me to solve the long pending issue.

If someone provides the code that's also fine for me.

Thanks for the response milan....

First I need to prove the code designer that my hardware is not having any issues till then he will not change his code. So please suggest is there anything might have turned up wrong on the hardware side.

Anyway you please give me the test code in such a way that the controller has to receive data periodically (may be once in 2 minutes) and send it to serially. So that I can monitor that on the COM port.

Please post your circuit. If possible draw it using Proteus.

Sorry I don't have circuit made for this right now.

You can consider the same schematic which you have given me as a reference. In my actual design I have hard coded the values of channel select to '0' and I have utilised only ALE, SOC and CLK as a control signal. The controller which I have used is standard 8051 so after all the processing send it to serially through UART.

Thanks in advance

- - - Updated - - -

It will be better if you could provide program in compatible to use with keil


Here is the working ADC0808 project which I made. The same applies for ADC 0809. I have not tested in hardware. There are two issues.

1. In Proteus ADC 0808 model the OUTx pins are reversed that is LSB is OUT7 and MSB is OUT0. So, I have reversed the connections with P2 but in your hardware you should not do this.

2. In mikroC the UART baudrate is set as 4800 bps and in Proteus VT the baudrate is set to 9600 bps to make it work. Maybe it is mikroC bug or Proteus bug. I think it is Proteus bug. So, if in hardware you get garbage data then just change baudrate to 9600 bps in code and compile with mikroC PRO 8051 demo Compiler.

broken link removed


  • ADC0808.rar
    92.9 KB · Views: 59
  • sim ss.png
    sim ss.png
    41.8 KB · Views: 102
Last edited by a moderator:
Are you not considering clock pulse in your code? Because clock condition is not checked anywhere in your code.

No, clock can be generated in code but I am giving 650 KHz clock to CLK pin of ADC0808/0809. Data sheet mentions clock can be between 650 KHz and 1280 KHz. If you want it in code then generate clock pulses in 8051 using Timer 0 or 1 and feed it to ADC 0808/0809 CLK pin.

Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to