Again, apologies from someone who's still learning fast but a couple of dumb questions concerning the ADC channels of the above chip if I may.
I intend to use a voltage reference of 4.096V and I realize that any voltage on the ADC channels above this will result in the ADC "topping out" but will any voltage over the reference but under VDD physically damage the ADC channel? I have 820 ohm resistors in series to limit any current to safe levels but the data sheet is not very clear.
A second question, whilst researching using the VRef function I notice that with some chips, a lump of C code seems to be necessary to configure registers. Does the 18F6722 need the same or is it a simple matter of setting VRef in the ADC properties.
Thanks for your patience
Chris
18F6722 ADC Questions
Moderator: Benj
-
- Posts: 55
- Joined: Tue Apr 01, 2014 9:10 am
- Has thanked: 16 times
- Been thanked: 18 times
- Contact:
- QMESAR
- Valued Contributor
- Posts: 1287
- Joined: Sun Oct 05, 2014 3:20 pm
- Location: Russia
- Has thanked: 384 times
- Been thanked: 614 times
- Contact:
Re: 18F6722 ADC Questions
As you correctly said if you use a 4.096 Vref then any volltage above the Vref will not be captured by the ADC.if you use VDD and VSS (Power rail voltage as reference (0-5V) you can capture 0 -5V(0- 1023 ADC bits) with the ADC pin.No as long as you stay with in the 0 -5V max range you will not damage the ADC and current limiting Resistors is not needed.anzacinexile wrote: I intend to use a voltage reference of 4.096V and I realize that any voltage on the ADC channels above this will result in the ADC "topping out" but will any voltage over the reference but under VDD physically damage the ADC channel?
You also have to be careful when placing current limiting resistors in line with an ADC pin as the ADC has a maximum impedance (Resistance Value ) that is allowed at the ADC pin above this value(in Electrical spec of ADC in Datasheet) will cause error results .
This is not necessary in Flow codeA second question, whilst researching using the VRef function I notice that with some chips, a lump of C code seems to be necessary to configure registers.
if you place an input such as a Potensiometer on the 3 or 2 D panel and select it then go to properties panel
You will see that you can select the Voltage of the Reference and also the reference to use as well as the Number of acquisitions and ADC conversion speed setting
Hope this helps good luck
https://www.flowcodexchange.com/
Regards QMESAR
Regards QMESAR
-
- Posts: 55
- Joined: Tue Apr 01, 2014 9:10 am
- Has thanked: 16 times
- Been thanked: 18 times
- Contact:
Re: 18F6722 ADC Questions
As always, a great help for a newbie like me. Many thanks QMESAR for clarifying things for me.
Chris
Chris
- QMESAR
- Valued Contributor
- Posts: 1287
- Joined: Sun Oct 05, 2014 3:20 pm
- Location: Russia
- Has thanked: 384 times
- Been thanked: 614 times
- Contact:
Re: 18F6722 ADC Questions
Chris you are welcome
Good luck and enjoy Flowcode
Good luck and enjoy Flowcode
https://www.flowcodexchange.com/
Regards QMESAR
Regards QMESAR