This repository contains examples of bare metal source code for Timer/Counter Type B (TCB) as described in TB3214 - Getting Started with Timer/Counter Type B (TCB) document from Microchip. The repository contains an Atmel Studio Solution with multiple projects inside:
- Using TCB in 8-bit PWM Mode: This use case shows how to generate an 8-bit PWM signal with 1 kHz frequency and 50% duty cycle on a GPIO pin (for more details, see Using TCB in 8-bit PWM Mode)
- Using TCB in Sleep Mode: This use case shows how to configure the TCB to produce an interrupt every second that wakes up the device from sleep and toggles an LED (for more details, see Using TCB in Sleep Mode)
- Using TCB in Time-out Check Mode: This use case shows how to configure the TCB to toggle an LED if the input signal is longer than the time-out period (for more details, see Using TCB in Time-out Check Mode)
More details and code examples on the ATMEGA4809 can be found at the following links:
- TB3214 - Getting Started with Timer/Counter Type B (TCB)
- ATMEGA4809 Product Page
- ATMEGA4809 Code Examples on GitHub
- ATMEGA4809 Project Examples in START
- Microchip Studio 7.0.2542 or newer (https://www.microchip.com/mplab/microchip-studio)
- ATmega_DFP 1.6.364 or newer Device Pack
- ATMEGA4809 Xplained Pro (ATMEGA4809-XPRO)