Problem with reference voltage on Arduino Mega
Posted: Fri May 05, 2017 9:43 am
Hello,
While finetuning my program I stumbled upon a problem with the internal reference voltage (ARef) of my Arduino Mega. I set the internal reference voltage to 2.56V just like LeighM explained me in one of my previous questions (viewtopic.php?f=63&t=18701).
The problem is, whenever I try to read an analog signal (I read the analog signal the way it's explained in the Flowcode wiki) the internal ARef voltage changes from 2.56V to AVCC (4.68V in my case).
--(It's the GetByte component macro in the attachment which causes the problem)
Does anyone have any solution to this? Maybe the C-code of the GetByte command which reads the analog signal interferes with the register that sets the internal ARef voltage (ADMUX).
Thanks, Coensk
While finetuning my program I stumbled upon a problem with the internal reference voltage (ARef) of my Arduino Mega. I set the internal reference voltage to 2.56V just like LeighM explained me in one of my previous questions (viewtopic.php?f=63&t=18701).
The problem is, whenever I try to read an analog signal (I read the analog signal the way it's explained in the Flowcode wiki) the internal ARef voltage changes from 2.56V to AVCC (4.68V in my case).
--(It's the GetByte component macro in the attachment which causes the problem)
Does anyone have any solution to this? Maybe the C-code of the GetByte command which reads the analog signal interferes with the register that sets the internal ARef voltage (ADMUX).
Thanks, Coensk