This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

How to resolve the contention between 2 ADC0801!!!???

How to resolve the contention between 2 ADC0801!!!???

I would like using two ADC0801 in order to read 2 Vol electric signal ., 2 ADC interfaces with AT89c51 by using common input..If I use an ADC, no problem, but with 2 ADC ,ADC will not working!!!! Please help me!!!

My programmer and file Proteus is below

www.MegaShare.com/512261

Parents Reply Children
  • Voltage dividers? How will that measure multiple voltage sources?

    Don't you mean an external analog multiplexer, or an ADC with multiple inputs?

  • ìn fact, it is not simple like that!!!!,i want to use RTOS for this application,system with multi Task.For example:,read ADC1,read ADC2,comunicate with keyboard,and show with led 7segs....each task correspond with each <cycle time>,and <different priority>...

    i only want know the reason, in single task system: why can't i use 2 ADC in turn in order to read ...maybe there are some error in my programer,or my proteus ???? help me to determine!!!!

  • Just use separate signals to drive the two chip-select lines.

    Or switch to an ADC with multiple inputs.

  • You need to stop throwing more confusion at this problem. Forget about RTOS, tasks, cycle times and priorities for now.

    why can't i use 2 ADC in turn in order to read

    How would anybody but you know? You haven't told us how you did use those 2 ADCs, nor what makes you think it didn't work.

  • Voltage dividers? How will that measure multiple voltage sources?

    Where did you see the OP mention multiple voltage sources? I only see him mentioning "2 Vol electric signal" and "a single input". Now maybe I'm jumping to conclusions, but for now I'll assume he thought that if a single ADC's input range is 1 Volt, but the input is 2 Volts, he must use 2 ADCs.

  • There is no reason why it shouldn't be simple!

    It only gets complicated because you make it so:

    "i want to use RTOS for this application"

    Why do you want to do that?

    Usually, the reason to ues an RTOS is because you need one - so, if you don't actually need one, don't use one!

    If you simply want an exercise in using an RTOS, then start with stuff that you already understand - don't confuse the issue by trying to learn both ADC interfacing and RTOS at the same time!

    Master one first, then move on to the other...

    "For example:,read ADC1,read ADC2,comunicate with keyboard,and show with led 7segs..."

    Absolutely no need whatsoever for an RTOS to do all that - and more!

    "i only want know the reason, in single task system: why can't i use 2 ADC in turn in order to read"

    If you don't know how to do it in a single task system, then you are certainly not ready to start doing it in a multi-task system!

    Learn to walk before you try to run.

    Lay the foundations before you try to put the roof on.

    etc, etc,...

  • thanks Hans-Bernhard Broeker...that is a thing what i want to ask all of you..

  • For a start, how do you know that you have "contention" between the two ADCs in the first place?

    Does each one work independently if you remove the other from the circuit?

    If this doesn't work, then you have a far more fundamental problem...

  • Andy Neil.. i understand what you mean,i am doing that work right now, i don't want to dispute,please focus my subject which i mention

  • I decided to decrypt "in order to read 2 Vol electric signal" into "in order to read two voltaic electric signals".

    With unclear requests, it is always hard to know what is actually meant.

    The only meaningful reason for two ADC would be an intention to read multiple signals. The alternative - running them off-phase for getting twice as many samples/second - is so complex that anyone who even get the idea would normally be expected to know how to resolve any contention problems.

  • i have alredy run 1 ADC...and you can see my file here... www.mediafire.com/

  • if you alredy see my project,you will see clear,when i press button, chip can't read ADC cause there is not any "interrupt signal" which is sended by ADC after convert...

    "Does each one work independently if you remove the other from the circuit?"
    i can drive ADC1 when i remove ADC2...see my first file above

  • To my knowledge, the /INTR signal is not tristate, so you can not directly connect two /INTR outputs to a single interrupt pin on your processor.

    You either have to connect them using a AND gate (any /INTR going low will drive the output of the AND low) or connect them to two separate inputs of the processor.

    The problem with letting them feed the same interrupt is that you will not know which ADC that is ready to be serviced (unless you only started one conversion).

    This is a big reason for using an external analog multiplexer, or an ADC with multiple inputs. Then you have _one_ ADC that will issue an interrupt, and you will always know which signal that is currently multiplexed into the ADC or which channel of the ADC that you requested to perform a conversion.

  • thank for caring my problem..... my english is not good,download my project,and all of you can undenstand clearly...

  • In my progam:
    i use 2 button to control 2 ADC.each ADC have each pin INTR to connect 2 separate input pin of the processor..so why d'ont INTR pin of ADC work,after converted...this thing cause ADC can't be read by processor