Giter Club home page Giter Club logo

avr16eb32-getting-started-with-tce-and-wex-mplab-bare-metal's Introduction

MCHP

Getting Started with Timer/Counter Type E (TCE) and WEX Bare Metal

This repository contains examples of bare metal source code for the new Timer/Counter Type E (TCE) and Waveform Extension (WEX) peripherals of the AVR® EB family of devices. There are three applications described in this document. Each application's functionality is explained.

  • Generate PWM Signals Using TCE: In this use case, the TCE is initialized in Dual Slope Mode to generate four Pulse-Width Modulation (PWM) signals with different duty cycles, scaling and high resolution option.
  • Generate Patterns Using WEX: This example shows how to use WEX to generate different patterns, and take control of the TCE pins during run time, without stopping the timer. This is extremely useful for applications like trapezoidal motor control for example, where some PWM signals must be forced to low '0' logic depending on the commutation sector.
  • Generate Eight Complementary Pulse-Width Modulation Signals Using the TCE and WEX modules: In this example the TCE timer is initialized in Single Slope mode and generates four PWM signals. WEX is configured to split the four PWM signals into eight complementary PWM signals with dead time. The PWM signals have different duty cycles, that get incremented in 0-100% range minus dead time. Duty cycles increment happens in Interrupt Service Routine during each compare register interrupt. A fault is triggered every 250 μs, driving all the outputs to low ‘0’ logic. Then the fault is cleared and normal operation is restored. After that, the process repeats itself over and over again.

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 test platform.


avr16eb32-getting-started-with-tce-and-wex-mplab-bare-metal's People

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.