Maker Pro
Maker Pro

Help with 16F876

C

CJunk

Jan 1, 1970
0
Hi there. Just was wondering if anyone can lead me to a site or give me
info that will show me basic operation of the ADC in the PIC16F876. I have
tried getting it to work but cannot seem to do it. I have checked out
www.microchip.com and the info there but it dont help me. Would like a
simple schematic and software guide if possible.thx
 
C

CJunk

Jan 1, 1970
0
CJunk said:
Hi there. Just was wondering if anyone can lead me to a site or give me
info that will show me basic operation of the ADC in the PIC16F876. I have
tried getting it to work but cannot seem to do it. I have checked out
www.microchip.com and the info there but it dont help me. Would like a
simple schematic and software guide if possible.thx

Dont worry I figured it out.

thx
 
D

david

Jan 1, 1970
0
was it a simple mistake why tell us how you fixed so quickly it might help
someone else.
David
 
C

CJunk

Jan 1, 1970
0
david said:
was it a simple mistake why tell us how you fixed so quickly it might help
someone else.
David

ok.... Initially I was connecting the 5k pot to the analogue input (RA0),
but didnt put the connection to the center of it and + to the one pot pin
and Gnd to other pot pin. I was just using two of the pins on the pot. I
hope what I typed came out all right. ...and hopefully it will help some
beginners out there.
 
H

Howard Long

Jan 1, 1970
0
ok.... Initially I was connecting the 5k pot to the analogue input (RA0),
but didnt put the connection to the center of it and + to the one pot pin
and Gnd to other pot pin. I was just using two of the pins on the pot. I
hope what I typed came out all right. ...and hopefully it will help some
beginners out there.

The other 'gotha' I've encountered on the 16F876 ADC is the relatively low
impedance of the ADC input.

Kind Regards, Howard
 
C

CJunk

Jan 1, 1970
0
Howard Long said:
The other 'gotha' I've encountered on the 16F876 ADC is the relatively low
impedance of the ADC input.

Kind Regards, Howard

Could you please let me know what 'impedance' affects? thx
 
E

Eric Bohlman

Jan 1, 1970
0
Could you please let me know what 'impedance' affects? thx

It means that the ADC will draw a non-trivial amount of current from the
source of the voltage that it's measuring. If the voltage source has a
high impedance, then drawing too much current from it will actually lower
the voltage it's supplying, and the reading will be wrong.

Consider a hypothetical ADC input with an input impedance of 5K. If you
were to connect it directly to a 5-volt supply, you'd accurately read 5
volts. But now consider connecting it to the 5-volt supply through a 1K
resistor. You'd read only 4.17 volts, because the impedance of the ADC
input forms a voltage divider with the resistor. If, OTOH, the input
impedance were 50K, you'd read 4.9 volts; you'd still have a voltage
divider, but the drop across the source resistor would be much smaller.
 
H

Howard Long

Jan 1, 1970
0
Eric Bohlman said:
It means that the ADC will draw a non-trivial amount of current from the
source of the voltage that it's measuring. If the voltage source has a
high impedance, then drawing too much current from it will actually lower
the voltage it's supplying, and the reading will be wrong.

Consider a hypothetical ADC input with an input impedance of 5K. If you
were to connect it directly to a 5-volt supply, you'd accurately read 5
volts. But now consider connecting it to the 5-volt supply through a 1K
resistor. You'd read only 4.17 volts, because the impedance of the ADC
input forms a voltage divider with the resistor. If, OTOH, the input
impedance were 50K, you'd read 4.9 volts; you'd still have a voltage
divider, but the drop across the source resistor would be much smaller.

.... I think that about covers it!

Regards, Howard
 
Top