A new feature introduced in the AVR® DB MCU is the Analog Signal Conditioning (OPAMP) peripheral. The OPAMP peripheral can be configured as a PGA, in this example the internal DAC and ADC are used to calibrate gain and offset for the PGA. For more information on the calibration procedure, see the application note.
- AN3633 - Gain and Offset Calibration of the Analog Signal Conditioning (OPAMP) Peripheral
- AVR128DB48 Curiosity Nano User Guide
- AVR128DB48 Device Page
- MPLAB® X v5.40 or later
- MPLAB® XC8 Compiler v2.20 or later
- MPLABX AVR-Dx_DFP version 1.4.75 or later
- For the Atmel Studio version of this project, please go to this repository
- No external hardware setup needed
- Connect the AVR128DB48 Curiosity Nano to a computer using a USB cable
- Download the zip file or clone the example to get the source code
- Open
avr128db48-opamp-gain-and-offset-calibration.X
in MPLAB - Press the make and program button to program the device
- If no tool has been chosen, a window will open, select the AVR128DB48 Curiosity Nano. Tool can also be choosen in the project settings.
After going through this example you should be able to calibrate the gain and offset of the OPAMP configured as a PGA.