Page 1 of 1

ADC internal Vref Activate

Posted: Thu Oct 14, 2021 5:16 pm
by RABO2320
Hi
please guide me

in the FC v8
I want to enable the internal reference voltage for ADC but there is no such option in ADC properties.
I even referred to the AVR_CAL_ADC.c file and:
changed the REFS1 & REFS0 bit in the ADMUX registry but it didn't work. :!: :!: :?: :!: :!:

Re: ADC internal Vref Activate

Posted: Fri Oct 15, 2021 8:28 am
by LeighM
What device are you using?

Re: ADC internal Vref Activate

Posted: Fri Oct 15, 2021 11:35 am
by RABO2320
I used AVR ATMEGA 8A.

Re: ADC internal Vref Activate

Posted: Sat Oct 30, 2021 4:43 pm
by RABO2320
Please someone guide me
How to enable internal reference voltage( int.Vref ) for ADC in FlowCode V8. :?: :?: :?: :?: :?:
I am using AVR microcontroller.(ATMEGA8)

Re: ADC internal Vref Activate

Posted: Sat Oct 30, 2021 8:45 pm
by chipfryer27
Hi

Can you be a bit more specific? Do you mean the AD7680 component or the generic Potentiometers? If the latter it's very simple under Properties.

Regards

Edit....

Posted before finishing my sentence (Doh..) If AD7680 then as far as I'm aware it only uses the Power Supply as reference

Re: ADC internal Vref Activate

Posted: Sun Oct 31, 2021 4:19 pm
by RABO2320
Hi
No, I do not use the AD7680 component.
I am using one of the ADC microcontroller input pins.
I input a sampled voltage to the ADC microcontroller input pins.This voltage is between zero and five volts.
I want to use 2.56 volts is the internal reference voltage for the ADC reference voltage.

Re: ADC internal Vref Activate

Posted: Sun Oct 31, 2021 9:08 pm
by medelec35
Hi RABO2320
Can you paste tthe following within windows explorer:

Code: Select all

C:\ProgramData\MatrixTSL\FlowcodeV8\CAL\AVR
Then replace the existing file with the attached version.
You will need to reload the flowchart after.
The file is untested as I have not got the same target device to test on.
You will need to change the reference properties to Vref +pin.
Instead of Vref +pin, hopefully it will work with 2.56 internal reference?

Re: ADC internal Vref Activate

Posted: Tue Nov 02, 2021 9:02 am
by RABO2320
Hi
The file you ATTACHMENTS does not work properly and gives the following error in the simulation:
screen.png
screen.png (416.24 KiB) Viewed 8906 times

Re: ADC internal Vref Activate

Posted: Tue Nov 02, 2021 9:35 am
by medelec35
Sorry, It was a typo.
Can you try the attached and see if it works?

Re: ADC internal Vref Activate

Posted: Wed Nov 03, 2021 4:09 pm
by RABO2320
Hi
Thank you for your guidance.
This file worked perfectly.

Re: ADC internal Vref Activate

Posted: Wed Nov 03, 2021 7:08 pm
by medelec35
That's excellent.
Thanks for letting me know.