What is ADC calibration and how can I activate it in Teensyduino?

Status
Not open for further replies.

darkness

Active member
Hi, browsing around the forums and the K20 reference manual, I came across this ADC calibration stated in para 31.4.6. Can anyone explain to me what it does and how can we do this calibration using the registers in Teensyduino? Also, would I expect better ADC accuracy after calibration? Thanks!
 
Teensyduino automatically does the ADC calibration at startup. It also does a new calibration if you change the ADC configuration with analogReference() or analogReadResolution().

The idea is you can easily use the Arduino functions without worrying how they work.

But if you want to learn more, the code is available in hardware/teensy/cores/teensy3/analog.c. The calibration begins with the analog_init() function and is completed with the wait_for_cal() function.
 
Status
Not open for further replies.
Back
Top