Skip to content

Commit 879f33a

Browse files
committed
MPAE-6022: added cnano user guide link, and changed title of Readme. Updated description in metadata, and added keywords
1 parent 3400a5e commit 879f33a

File tree

4 files changed

+63
-19
lines changed

4 files changed

+63
-19
lines changed

.main-meta/main.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"version": "1.0.0",
88
"displayName": "Gain and Offset Calibration of the Analog Signal Conditioning (OPAMP) Peripheral",
99
"projectName": "avr128db48-opamp-gain-and-offset-calibration-mplab",
10-
"shortDescription": "This application note describes how to calibrate the gain and offset of the Analog Signal Conditioning (OPAMP) peripheral when configured as a Programmable Gain Amplifier (PGA). The microcontroller's (MCU's) internal digital-to-analog converter (DAC) and analog-to-digital converter (ADC) are used to perform the calibration procedure. No external components are required.",
10+
"shortDescription": "This MPLAB X bare metal example in Gain and Offset Calibration of the Analog Signal Conditioning (OPAMP) Peripheral (AN3633) shows how to calibrate the gain and offset of the OPAMP when configured as a Programmable Gain Amplifier (PGA). The internal Digital-to-Analog converter (DAC) and Analog-to-Digital converter (ADC) are used to perform the calibration procedure. No external components are required.",
1111
"ide": {
1212
"name": "MPLABX",
1313
"semverRange": ">=5.40"
@@ -43,9 +43,6 @@
4343
],
4444
[
4545
"Peripherals", "DAC"
46-
],
47-
[
48-
"Peripherals", "VREF"
4946
],
5047
[
5148
"Peripherals", "ADC"
@@ -55,7 +52,7 @@
5552
]
5653
],
5754
"peripherals": [
58-
"OPAMP", "DAC", "VREF", "ADC"
55+
"OPAMP", "DAC", "ADC"
5956
],
6057
"keywords": [
6158
"Analog Signal Conditioning",
@@ -67,6 +64,9 @@
6764
"Gain",
6865
"Offset",
6966
"Calibration"
67+
"AVR-DB",
68+
"AVRDB",
69+
"opamp-gain-and-offset-calibration"
7070
],
7171
"additionalData": {
7272
"longDescription": {

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
<!-- Please do not change this html logo with link -->
22
<a href="https://www.microchip.com" rel="nofollow"><img src="images/microchip.png" alt="MCHP" width="300"/></a>
33

4-
# AVR128DB48 Gain and Offset Calibration of the Analog Signal Conditioning (OPAMP) Peripheral
4+
# Gain and Offset Calibration of the Analog Signal Conditioning (OPAMP) Peripheral
55

66
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](https://microchip.com/DS00003633).
77

88
## Related Documentation
99

1010
* [AN3633 - Gain and Offset Calibration of the Analog Signal Conditioning (OPAMP) Peripheral](https://microchip.com/DS00003633)
11-
* AVR128DB48 Curiosity Nano User Guide (link will be added once available)
11+
* [AVR128DB48 Curiosity Nano User Guide](https://www.microchip.com/DS50003037)
1212
* [AVR128DB48 Device Page](https://www.microchip.com/wwwproducts/en/AVR128DB48)
1313

1414
## Software Used

avr128db48-opamp-gain-and-offset-calibration.X/main.c

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -28,20 +28,19 @@
2828
#include <avr/io.h>
2929
#include <util/delay.h>
3030

31-
//To program the fuse bits, the FUSE macro is used. The fuse settings are set to the devices production values.
31+
//To program the fuse bits, the FUSE macro is used. The fuse settings are set to the devices production values.
3232
FUSES = {
33-
.WDTCFG = 0x00, // WDTCFG {PERIOD=OFF, WINDOW=OFF}
34-
.BODCFG = 0x10, // BODCFG {SLEEP=DISABLE, ACTIVE=DISABLE, SAMPFREQ=32Hz, LVL=BODLEVEL0}
35-
.OSCCFG = 0x78, // OSCCFG {CLKSEL=OSCHF}
36-
.SYSCFG0 = 0xF6, // SYSCFG0 {EESAVE=CLEAR, CRCSEL=CRC32, CRCSRC=NOCRC}
37-
.SYSCFG1 = 0xE8, // SYSCFG1 {SUT=0MS, MVSYSCFG=DUAL}
38-
.CODESIZE = 0x00, // CODESIZE
39-
.BOOTSIZE = 0x00, // BOOTSIZE
33+
.WDTCFG = 0x00, // WDTCFG {PERIOD=OFF, WINDOW=OFF}
34+
.BODCFG = 0x00, // BODCFG {SLEEP=DISABLE, ACTIVE=DISABLE, SAMPFREQ=32Hz, LVL=BODLEVEL0}
35+
.OSCCFG = 0x00, // OSCCFG {CLKSEL=OSCHF}
36+
.SYSCFG0 = 0xC0, // SYSCFG0 {EESAVE=CLEAR, CRCSEL=CRC32, CRCSRC=NOCRC}
37+
.SYSCFG1 = 0x08, // SYSCFG1 {SUT=0MS, MVSYSCFG=DUAL}
38+
.CODESIZE = 0x00, // CODESIZE
39+
.BOOTSIZE = 0x00, // BOOTSIZE
4040
};
41-
4241
//Macro used to set lockbits. Set to production value.
4342
LOCKBITS = {
44-
0x5CC5C55C, // KEY {KEY=NOLOCK}
43+
0x5CC5C55C, // KEY {KEY=NOLOCK}
4544
};
4645

4746
// The VREF (Voltage Reference) peripheral will be set up to generate a

avr128db48-opamp-gain-and-offset-calibration.X/nbproject/configurations.xml

Lines changed: 47 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@
7272
<property key="default-bitfield-type" value="true"/>
7373
<property key="default-char-type" value="true"/>
7474
<property key="define-macros" value="NDEBUG"/>
75-
<property key="disable-optimizations" value="true"/>
75+
<property key="disable-optimizations" value="false"/>
7676
<property key="extra-include-directories" value=""/>
7777
<property key="favor-optimization-for" value="-speed,+space"/>
7878
<property key="garbage-collect-data" value="true"/>
@@ -86,7 +86,7 @@
8686
<property key="optimization-debug" value="false"/>
8787
<property key="optimization-invariant-enable" value="false"/>
8888
<property key="optimization-invariant-value" value="16"/>
89-
<property key="optimization-level" value="-O0"/>
89+
<property key="optimization-level" value="-O1"/>
9090
<property key="optimization-speed" value="false"/>
9191
<property key="optimization-stable-enable" value="false"/>
9292
<property key="pack-struct" value="true"/>
@@ -188,6 +188,8 @@
188188
<property key="memories.programmemory" value="true"/>
189189
<property key="memories.programmemory.ranges" value="0-ffff"/>
190190
<property key="poweroptions.powerenable" value="false"/>
191+
<property key="programmerToGoFilePath"
192+
value="C:/GIT/avr128db48-opamp-gain-and-offset-calibration-mplab/avr128db48-opamp-gain-and-offset-calibration.X/debug/free/avr128db48-opamp-gain-and-offset-calibration_ptg"/>
191193
<property key="programoptions.eraseb4program" value="true"/>
192194
<property key="programoptions.preservedataflash" value="false"/>
193195
<property key="programoptions.preservedataflash.ranges"
@@ -343,6 +345,49 @@
343345
<property key="user-pack-device-support" value=""/>
344346
<appendMe value="-std=gnu99"/>
345347
</XC8-config-global>
348+
<nEdbgTool>
349+
<property key="AutoSelectMemRanges" value="auto"/>
350+
<property key="communication.activationmode" value="nohv"/>
351+
<property key="communication.interface" value="updi"/>
352+
<property key="communication.speed" value="0,500"/>
353+
<property key="debugoptions.useswbreakpoints" value="false"/>
354+
<property key="firmware.path"
355+
value="Press to browse for a specific firmware version"/>
356+
<property key="firmware.toolpack"
357+
value="Press to select which tool pack to use"/>
358+
<property key="firmware.update.action" value="firmware.update.use.latest"/>
359+
<property key="memories.aux" value="false"/>
360+
<property key="memories.bootflash" value="true"/>
361+
<property key="memories.configurationmemory" value="true"/>
362+
<property key="memories.configurationmemory2" value="true"/>
363+
<property key="memories.dataflash" value="true"/>
364+
<property key="memories.eeprom" value="true"/>
365+
<property key="memories.exclude.configurationmemory" value="true"/>
366+
<property key="memories.flashdata" value="true"/>
367+
<property key="memories.id" value="true"/>
368+
<property key="memories.instruction.ram.ranges"
369+
value="${memories.instruction.ram.ranges}"/>
370+
<property key="memories.programmemory" value="true"/>
371+
<property key="memories.programmemory.ranges" value="0-ffff"/>
372+
<property key="poweroptions.powerenable" value="false"/>
373+
<property key="programmerToGoFilePath"
374+
value="C:/GIT/avr128db48-opamp-gain-and-offset-calibration-mplab/avr128db48-opamp-gain-and-offset-calibration.X/debug/pro/avr128db48-opamp-gain-and-offset-calibration_ptg"/>
375+
<property key="programoptions.eraseb4program" value="true"/>
376+
<property key="programoptions.preservedataflash" value="false"/>
377+
<property key="programoptions.preservedataflash.ranges"
378+
value="${memories.dataflash.default}"/>
379+
<property key="programoptions.preserveeeprom" value="false"/>
380+
<property key="programoptions.preserveeeprom.ranges" value="1400-15ff"/>
381+
<property key="programoptions.preserveprogram.ranges" value=""/>
382+
<property key="programoptions.preserveprogramrange" value="false"/>
383+
<property key="programoptions.preserveuserid" value="false"/>
384+
<property key="programoptions.programuserotp" value="false"/>
385+
<property key="toolpack.updateoptions"
386+
value="toolpack.updateoptions.uselatestoolpack"/>
387+
<property key="toolpack.updateoptions.packversion"
388+
value="Press to select which tool pack to use"/>
389+
<property key="voltagevalue" value=""/>
390+
</nEdbgTool>
346391
</conf>
347392
</confs>
348393
</configurationDescriptor>

0 commit comments

Comments
 (0)