Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations cowski on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

ADC0808 problems 3

Status
Not open for further replies.

thekoookooo

Electrical
Jul 10, 2002
8
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.
 
Replies continue below

Recommended for you

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?

 
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.
 
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!
 
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.
 
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?
 
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!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor