1 Introduction

This training document contains assignments that give a general introduction to the new features of the AVR® DB Family. Each assignment starts with a basic introduction, then the functionality is verified through the MPLAB® Data Visualizer. Every assignment is provided with a preconfigured code, where most of the code is already in place, and only essential modules for the specific assignment need to be configured. Each assignment comes with a solution.

The new AVR® DB Family of microcontrollers comes with three features that will be highlighted in this training. The features are a new Clock Controller (CLKCTRL), Analog Signal Conditioning (OPAMP), and Multi-Voltage I/O (MVIO).

The new CLKCTRL has a new clock source called the High Frequency Crystal Oscillator (XOSCHF) and Clock Failure Detection (CFD). The XOSCHF enables the use of an external crystal or an external clock signal up to 32 MHz. This can be used as a clock source for the Main Clock (CLK_MAIN), the Real-Time Counter (RTC), and the 12-bit Timer/Counter Type D (TCDn). The CFD feature can be used to detect if the output from a clock source stops and can switch the Main Clock to a different clock source.

The OPAMP peripheral features up to three internal operational amplifiers (op amps) as well as a resistor ladder for each op amp. The resistor ladder can be used to create a variety of classical op amp configurations. The main purpose of op amps is to condition the analog signals before an acquisition or to provide the necessary output drive in control applications.

The MVIO allows a subset of the I/O pins to be powered by a different I/O voltage domain called VDDIO2. The rest of the I/O pins runs on VDD, which may remove the need for external level shifters when communicating with other devices running on a different target voltage.

This training covers the following topics:
  • Assignment 1: CLKCTRL - External High-Frequency Oscillator (XOSCHF) and Clock Failure Detection (CFD)
  • Assignment 2: CLKCTRL - High Frequency TCD using PLL
  • Assignment 3: OPAMP - Voltage Follower
  • Assignment 4: OPAMP - Non-Inverting PGA
  • Assignment 5: MVIO - OPAMP as a Regulated Power Supply for VDDIO2
  • Assignment 6: MVIO - VDDIO2 Failure Detection