Skip to content

This repository contains examples of MCC Melody generated source code for the TCE and WEX peripherals of the AVR EB family of devices.

License

Notifications You must be signed in to change notification settings

microchip-pic-avr-examples/avr16eb32-tce-and-wex-new-features-examples-mplab-mcc

Repository files navigation

MCHP

TCE and WEX New Features Examples

This repository contains examples of MPLAB® Code Configurator (MCC) Melody source code for the new Timer Counter type E (TCE) and Waveform Extension (WEX) peripherals of the AVR® EB family of devices. There are five applications described in this document. Each application highlights the two peripherals' new features, along with the application's functionality.

  • PWM Signal Modulation Code Example: In this use case, the TCE and WEX generate sinusoidal signals modulating the Pulse-Width Modulation (PWM) signals. At run time, the sinewave can be modulated in frequency or amplitude.
  • Dead time and Fault Code Example: This example shows how WEX and TCE generate complementary signals with added dead time in hardware. This code example highlights the fault hardware handling feature, and the fault hardware filter.
  • Scaling Code Example: In this example, the TCE is initialized in Dual-Slope mode with initial values for the duty cycles of PWM signals. During run time, the duty cycles values change depending on the Amplitude and Scale mode values. This code example highlights the hardware scaling feature of the TCE for duty cycle values.
  • High-Resolution Code Example: In this example, TCE generates four PWM signals with one peripheral clock cycle difference between the duty cycles of each PWM signal. The peripheral clock is configured to enable the High Resolution feature of TCE (up to 160 MHz).
  • Pattern Generation and Swap Code Example: This is a basic use case of the WEX peripheral to set a pattern for the output signals that changes periodically. This example shows how WEX controls TCE's output signals to generate patterns, and how the Swap feature works.

Related Documentation

More details and code examples on the AVR16EB32 can be found at the following links:

Software Used

Hardware Used

Setup

The AVR16EB32 Curiosity Nano Development board is used as a test platform.


About

This repository contains examples of MCC Melody generated source code for the TCE and WEX peripherals of the AVR EB family of devices.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published