×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

ADC0808 problems
3

ADC0808 problems

ADC0808 problems

(OP)
Hello everybody, here is my problem:

I'm using an analog to digital converter (the ADC0808) in order to get position information from several potentiometers fixed on different shafts(it's for a robot arm).
I build the circuit and i'm using a program in C (made by me) in order to see the data on the screen. The chip is supposed to convert a value 0-5Vdc into a number 0-255. It does it but it acts pretty strange. Example: it's linear from 0 to 32 but once there it jumps to 64, goes linear again until 99 then gets back to 33 and continues linearly. Everything else in the circuit works fine, i'm sure the problem is my ADC.
What do you think about that?
Thanks a lot.

RE: ADC0808 problems

Hello,
Are you also sure in your programm?
May be, the error is in software interpretation you have made in "C"?
Since ADC0808 is the successive approximation device, it is critical to maintain the reading algorithm. Are you sure that you perform the reading after EOC goes high?
And at last, are you sure you are keeping the same input channel, but not changing input channel address?

RE: ADC0808 problems

Hi, check that your D6 connection is correct.

RE: ADC0808 problems

(OP)
Hi,

Thanks for answering. Today I plugged the 0808 directly on my BasicStampII (a little microcontroller) and it displayed the right value (linear from 0 to 255). So the problem isn't the converter or the way I've wired it. I will have a closer look to my program and my data transfering circuit (from the 0808 to the PC). Since the PC has only 4 input bits on its parallel port, I used two 74373 in order to split in two the 8 bits from the converter. Maybe the problem is down there.

Thanks, again and I will post later an image of my circuit.

RE: ADC0808 problems

Actually, your parallel port should have 5 dedicated inputs, 4 dedicated outputs, and 8 outputs with the potential for configuration as inputs.  Try figuring out exactly what type of parallel port (ECP, standard, etc.) you have, and it might be worth simply configuring the parallel port data lines as inputs to elimate those messy '373s.

Good luck and keep us posted!

RE: ADC0808 problems

(OP)
Problem solved.

It wasn't the ADC0808, it was my way of wiring the 373. Now everything works fine. My next challenge is a motion controller, the LM629. Hope to get over that too.

Thaks for everything.

RE: ADC0808 problems

(OP)
By the way, melone, how do you configure the parallel port bidirectional on the 8 output bits? And I've heard that you can also use the 8 grounded pins as I/O. Is that true?

RE: ADC0808 problems

You cannot touch the ground pins.  Those need to stay at ground potential.  However, to set the data line to inputs, you need to write to a configuration register that is in the same memory space as the parallel port.  I don't remember exactly which address (especially since the address is hardware dependant), but if you do a search on this site, I know that I have answered this question on a couple of different occasions.  You can also do a google search on parallel port and you should find a large amount of information!

Good luck and congratualtions on figuring it out!

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources