Skip to content

MPLAB X training code examples for the AVR DB family of microcontrollers, demonstrating use of the OPAMP, XOSCHF and MVIO peripherals.

License

Notifications You must be signed in to change notification settings

microchip-pic-avr-examples/avr128db48-training-on-opamp-xoschf-mvio-mplab

Repository files navigation

MCHP

Training on OPAMP, XOSCHF and MVIO

This training consists of six assignments exploring some of the new features of the AVR® DB, namely the Analog Signal Conditioning (OPAMP), the High Frequency Crystal Oscillator (XOSCHF) and the Multi Voltage I/O (MVIO).

The OPAMP peripheral features up to three internal operational amplifiers (op amps). The op amps can be configured in a multitude of different operations using internal multiplexers and resistor ladders.

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 MVIO allows PORTC of the AVR DB to run on a different voltage domain (VDDIO2) than the rest of the PORTC.

  • Assignment 1: External High-Frequency Oscillator (XOSCHF) and Clock Failure Detection (CDF)
  • Assignment 2: High Frequency TCD using PLL
  • Assignment 3: Voltage Follower
  • Assignment 4: Instrumentation Amplifier
  • Assignment 5: Op Amp as a Regulated Power Supply for VDDIO2
  • Assignment 6: VDDIO2 Failure Detection

Each assignment also comes with a solution project found in the corresponding solution folder.

Note: The newest version of the code will be slightly different from the code seen in the Training video and guide due to header file and compiler updates.

Click the image below to access the training video.


AVR DB

Related Documentation

Future Reading

Software Used

Hardware Used

Setup

Most assignments can be completed using the AVR128DB48 Curiosity Nano without any extra components, but some require the MPLAB Data Visualizer stand-alone, MPLAB® Mindi™ Analog Simulator, a logic analyzer or hardware modifications. See the training manual for the setup of specific assignments.

MCHP

Operation

  • Connect the AVR128DB48 Curiosity Nano to the computer using a USB cable
  • Clone the repository or download the zip to get the source code
  • Use MPLAB to open the .X projects in the folder of the desired assignment
  • Complete the assignment according to the training manual
  • Press Make and Program Device to run the example

SetUpAssignment

Conclusion

This training facilitates a better understanding of some of the new features of the AVR DB such as the OPAMP, XOSCHF and MVIO.

About

MPLAB X training code examples for the AVR DB family of microcontrollers, demonstrating use of the OPAMP, XOSCHF and MVIO peripherals.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •