Hello
I am working on a project that requires a 18F4550 to read an analouge voltage between 0.5V to 4.5V. In the ADC component I can only find a settting to use the Vref+ input but nothing on how to enable the Vref- input. Is it possible to modify the ADC compnoent in some way?
ADC Using Vref-
Moderator: Benj
- Jan Lichtenbelt
- Posts: 797
- Joined: Tue Feb 17, 2009 8:35 pm
- Location: Haren GN, the Netherlands
- Has thanked: 128 times
- Been thanked: 264 times
- Contact:
Re: ADC Using Vref-
Dear Beambase,
In the ADC properties you can choose for Vref-option: Vdd or Vref+. By choosing Vref+ you enable this option. Just put Vref+ on pin 5 of 18F4550 and it must work as you wish.
Succes
Jan Lichtenbelt
In the ADC properties you can choose for Vref-option: Vdd or Vref+. By choosing Vref+ you enable this option. Just put Vref+ on pin 5 of 18F4550 and it must work as you wish.
Succes
Jan Lichtenbelt
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: ADC Using Vref-
Hello,
To allow for Vref- functionality you will have to use the code customisation feature of v4 to edit the ADC sample component macro. The -Vref is simply a bit that is set or cleared in one of the ADCON registers. The device datasheet will show you exactly which bit and register to change and the +Vref bit of code should show you how to manipulate the register.
To allow for Vref- functionality you will have to use the code customisation feature of v4 to edit the ADC sample component macro. The -Vref is simply a bit that is set or cleared in one of the ADCON registers. The device datasheet will show you exactly which bit and register to change and the +Vref bit of code should show you how to manipulate the register.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel