Home › Forums › Mayfly Data Logger › Mayfly v1.1 technical questions forum thread › Reply To: Mayfly v1.1 technical questions forum thread
2023-06-06 at 5:42 PM
#17870
The analog reference voltage (AREF) pin of the ATmega1284P is broken out to the left-hand 2×10 header if you wanted to apply a voltage other than (and less than) 3.3v. If you leave it floating
The analog reference voltage (AREF) pin of the ATmega1284P is broken out to the left-hand 2×10 header if you wanted to apply a voltage other than (and less than) 3.3v. If you leave it floating and don’t specify the AREF in your code, then it’ll use the default 10-bit setting for any regular analog reading like you’ll find in most code examples. If you apply a voltage other than 3.3v to AREF, you’ll need to add code to tell the sketch that you want to use AREF as the reference, plus take that into account for any ADC calculations you make. So follow examples you might find online for other Arduino boards for using a custom analog reference. I broke out the AREF to the header in the rare chance that someone would want to use it, but we found that most people are much happier with the increased resolution and sample rate and code flexibility of the aux ADC that I don’t know of anyone actually modifying AREF, but the capability is there on the Mayfly board if you want it.