ADC internal Vref Activate

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 8.

Moderator: Benj

Post Reply
RABO2320
Posts: 41
Joined: Sun Mar 01, 2020 1:39 pm
Has thanked: 1 time
Been thanked: 2 times
Contact:

ADC internal Vref Activate

Post 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. :!: :!: :?: :!: :!:

User avatar
LeighM
Matrix Staff
Posts: 2178
Joined: Tue Jan 17, 2012 10:07 am
Has thanked: 481 times
Been thanked: 699 times
Contact:

Re: ADC internal Vref Activate

Post by LeighM »

What device are you using?

RABO2320
Posts: 41
Joined: Sun Mar 01, 2020 1:39 pm
Has thanked: 1 time
Been thanked: 2 times
Contact:

Re: ADC internal Vref Activate

Post by RABO2320 »

I used AVR ATMEGA 8A.

RABO2320
Posts: 41
Joined: Sun Mar 01, 2020 1:39 pm
Has thanked: 1 time
Been thanked: 2 times
Contact:

Re: ADC internal Vref Activate

Post 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)

chipfryer27
Valued Contributor
Valued Contributor
Posts: 617
Joined: Fri Jun 06, 2014 3:53 pm
Has thanked: 184 times
Been thanked: 195 times
Contact:

Re: ADC internal Vref Activate

Post 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

RABO2320
Posts: 41
Joined: Sun Mar 01, 2020 1:39 pm
Has thanked: 1 time
Been thanked: 2 times
Contact:

Re: ADC internal Vref Activate

Post 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.

medelec35
Matrix Staff
Posts: 9520
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2585 times
Been thanked: 3815 times
Contact:

Re: ADC internal Vref Activate

Post 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?
Attachments
AVR_CAL_ADC.c
(26.77 KiB) Downloaded 102 times
Martin

RABO2320
Posts: 41
Joined: Sun Mar 01, 2020 1:39 pm
Has thanked: 1 time
Been thanked: 2 times
Contact:

Re: ADC internal Vref Activate

Post 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 3575 times

medelec35
Matrix Staff
Posts: 9520
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2585 times
Been thanked: 3815 times
Contact:

Re: ADC internal Vref Activate

Post by medelec35 »

Sorry, It was a typo.
Can you try the attached and see if it works?
Attachments
AVR_CAL_ADC.c
(26.77 KiB) Downloaded 97 times
Martin

RABO2320
Posts: 41
Joined: Sun Mar 01, 2020 1:39 pm
Has thanked: 1 time
Been thanked: 2 times
Contact:

Re: ADC internal Vref Activate

Post by RABO2320 »

Hi
Thank you for your guidance.
This file worked perfectly.

medelec35
Matrix Staff
Posts: 9520
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2585 times
Been thanked: 3815 times
Contact:

Re: ADC internal Vref Activate

Post by medelec35 »

That's excellent.
Thanks for letting me know.
Martin

Post Reply