Mega 2560 DUE Internal reference

Porting some code written for a MEGA2560 to a DUE. I get an error on the line where I set the internal reference to 2V56 Volts. Does the due have a 2.56 internal reference. Here is the error message

C:\Users\ka5co\Documents\Arduino\Greenhouse_MEGA2560_Slave_1.0.4\Greenhouse_MEGA2560_Slave_1.0.4.ino: In function 'void setup()':
C:\Users\ka5co\Documents\Arduino\Greenhouse_MEGA2560_Slave_1.0.4\Greenhouse_MEGA2560_Slave_1.0.4.ino:137:19: error: 'INTERNAL2V56' was not declared in this scope
   analogReference(INTERNAL2V56);
                   ^
Multiple libraries were found for "OneWire.h"
  Used: C:\Users\ka5co\Documents\Arduino\libraries\OneWire
  Not used: C:\Users\ka5co\Documents\Arduino\libraries\MAX31850_OneWire
exit status 1

Compilation error: 'INTERNAL2V56' was not declared in this scope

A look at the analogReference() reference reveals:

AR_DEFAULT: the default analog reference of 3.3V. This is the only supported option for the Due.

And to get a link to the reference page that gives details for the DUE, try a Google search on;

arduino analogReference

Thanks.

I assume I can use the AREF pin. It is now much but I need the lower reference level.

I did and all I got was references to the MEGA 2560 (5V version).

Not without kind of AR_EXTERNAL mode.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.