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.

Status
Not open for further replies.

Viann

New Member
PIC I will be using is the PIC16F877A.

My question is, how do I manually manipulate the ADC input values using resistors? If not resistors, is there an alternative method?

My ADC is set to VDD as VREF+ and VSS as VREF-
The port I want to manipulate is Pin-3, which is RA0/AN0.

I have tried connecting resistors directly from AN0 to VDD, but it keeps giving out the 5V reading. Shouldn't there be some voltage drop across the resistor and the reading should be at a lower Voltage value?

PIC I will be using is the PIC16F877A.

My question is, how do I manually manipulate the ADC input values using resistors? If not resistors, is there an alternative method?

My ADC is set to VDD as VREF+ and VSS as VREF-
The port I want to manipulate is Pin-3, which is RA0/AN0.

I have tried connecting resistors directly from AN0 to VDD, but it keeps giving out the 5V reading. Shouldn't there be some voltage drop across the resistor and the reading should be at a lower Voltage value?

hi again Viann.

To get a reduced voltage you require two resistors to form a potential divider.

For example, two 4.7K resistors in series between +5V and 0v will give +2.5V at the junction of the two resistors.

Is this what you mean.?

Here you a little drawing to go by I like this way because i can set it how I want it to read

Attachments

5.3 KB · Views: 172
I think the following merits some explanation.
I have tried connecting resistors directly from AN0 to VDD, but it keeps giving out the 5V reading. Shouldn't there be some voltage drop across the resistor and the reading should be at a lower Voltage value?

AN0 is an analog input. It tests to see what the voltage is at the pin but draws an insignificant amount of current. No current flows in a resistor between Vdd and AN0.

What is often misunderstood is that a resistor with no current flowing through it will have the same voltage on both ends.

Why is there no voltage drop ?

The voltage drop across a resistor is
V=IR
If the current I is zero the voltage drop for the resistor will also be zero.

3v0

Feel free to untangle the little lies that exist in the above. As a digital guy I tend to simplify the analog.

I'd leave that alone LOOKs good to me 3v0 my reply was to this
how do I manually manipulate the ADC input value

Last edited:
Status
Not open for further replies.