This repository contains examples of MPLAB® Code Configurator (MCC) generated source code for Timer/Counter Type A (TCA) as described in TB3217 - Getting Started with Timer/Counter Type A (TCA) document from Microchip. The repository contains three MPLAB® X Integrated Development Environment (IDE) projects inside:
- Generating a Dual-Slope PWM Signal: This use case shows how to generate a dual slope 16-bit PWM signal with 1 kHz frequency and 50% duty cycle on a GPIO pin (for more details, see Generating a Dual-Slope PWM Signal)
- Generating Two PWM Signals in Split Mode: This use case shows how to initialize the timer in Split mode to generate two single-slope 8-bit PWM signals on two GPIO pins, with independent duty cycle and frequency (for more details, see Generating Two PWM Signals in Split Mode)
- Using Periodic Interrupt Mode: This use case shows how to initialize the timer in Single mode to work as a counter. The counter overflows every 250 ms and triggers an interrupt, which toggles a pin (for more details, see Using Periodic Interrupt Mode)
More details and code examples on the AVR128DA48 can be found at the following links:
- TB3217 - Getting Started with Timer/Counter Type A (TCA)
- AVR128DA48 Product Page
- AVR128DA48 Code Examples on GitHub
- AVR128DA48 Project Examples in START
- MPLAB® X Integrated Development Environment (IDE) 5.40 or newer (microchip.com/mplab/mplab-x-ide)
- MPLAB® XC8 2.30 or a newer compiler (microchip.com/mplab/compilers)
- MPLAB® Code Configurator (MCC) 4.0.1 or newer (microchip.com/mplab/mplab-code-configurator)
- MPLAB® Code Configurator (MCC) Device Libraries 8-bit AVR MCUs 2.5.0 or newer (microchip.com/mplab/mplab-code-configurator)
- AVR-Dx 1.4.75 or a newer Device Pack
- AVR128DA48 Curiosity Nano (DM164151)