View previous topic :: View next topic |
Author |
Message |
uma
Joined: 17 Apr 2014 Posts: 29 Location: chennai
|
Can i connect a pot directly without ADC to 16F877a to read? |
Posted: Sat May 03, 2014 2:09 am |
|
|
Can i connect a potentiometer directly without ADC to 16F877a to read the values directly ? Pls reply soon. waiting for it. I want to connect the pot as Analog Input. _________________ uma
Application Engineer,
ETPL |
|
|
Mike Walne
Joined: 19 Feb 2004 Posts: 1785 Location: Boston Spa UK
|
|
Posted: Sat May 03, 2014 3:53 am |
|
|
The '877A PIC has a built in ADC.
Read the data sheet to find out which pins you can use as analogue inputs.
Mike |
|
|
temtronic
Joined: 01 Jul 2010 Posts: 9243 Location: Greensville,Ontario
|
|
Posted: Sat May 03, 2014 5:15 am |
|
|
As Mike says, The 877 does have several inputs to the ADC however if none are available there is a method of using a digital I/O pin to read analoque voltages. You'll have to probably use Google to locate the method. I can't show you my CCS C code for it as that was 14 years ago when I did it!
hth
jay |
|
|
asmboy
Joined: 20 Nov 2007 Posts: 2128 Location: albany ny
|
|
Posted: Sat May 03, 2014 2:24 pm |
|
|
as a rule of thumb:
the resistance of the pot - end to end must be NO greater than Twice the MINIMUM specified source impedance for accurate ADC reading.
so for a given PIC with a 5k ohm source minimum a 10k pot is as HIGH in value as you dare go.
assuming one end of pot is at Vcc and the other at ground. |
|
|
Ttelmah
Joined: 11 Mar 2010 Posts: 19538
|
|
Posted: Sat May 03, 2014 2:33 pm |
|
|
You can also cheat another way.
This chip has a programmable Vref, feeding the comparator. Only a handful of lines of code to simulate a 16 level ADC with this. |
|
|
uma
Joined: 17 Apr 2014 Posts: 29 Location: chennai
|
|
Posted: Tue May 06, 2014 12:30 am |
|
|
thanks for your responses guys,i was busy a little with other project,hence took a gap in this project.I will come back again with my queries after creating and testing my model. _________________ uma
Application Engineer,
ETPL |
|
|
|