Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

controlling ADC0808 using parallel port

Status
Not open for further replies.

Harry1234

New Member
Hey guys,

i have this problem and i was wondering if you can help out.

My project is the following: i use the parallel port of the PC, and using C++ code i read values from In0 and In1 of the ADC0808. on the in0 i have connected a thermistor and on the In1 a humidity sensor. The range goes from 0v to 5v and with 8-bit resolution from 0 - 255.
the adc0808 is clocked by a 555 timer.

I use a parallel to serial shift register to read the values and display them on the screen.


testing:

for start, i connected 0v to the input and the output of the conversion of the ADC was 0.
when i connected 5v, the output was 255.

for testing purposes, i connected 2 x 10KΩ resistors acting as voltage divider and the result from the conversion is as expected. 128 is the output of the ADC0808 @ 2.5V.

when i connected 3 resistors of 10KΩ in series, the input voltage of the ADC0808 was 1.6667V and the expected result of the ADC would have been 85 ( 255 equals 5v, for 1.6667V what is the equivalent adc value? = 85). but instead i get 120. I had it running for 3 hours and at every
check, the result was 120

the way i operate the ADC0808 is as follows:

1. Select analog input 3 on MUX of ADC0808 (i.e channel 0)
2. Turn ALE ON
3. Turn START=1. i.e Start conversion
4. Turn ALE OFF
5. Make START=0
6. I monitor the pin until End of Conversion(EOC) goes HIGH.


can you please advice on what is going wrong?




thanx in advance

Harry
 
in case you find this relevant, for power supply i dont use the 5v and 12v of the computer but instead a homemade power supply consisting of a trnasformer, 2 electrolytic capacitos and a voltage regulator.

thinking fo using Pc's voltage though.


thus eliminating any noise or voltage variations
 
Status
Not open for further replies.

Latest threads

Back
Top