Peripheral Trigger Generator (PTG)
Abstract
The Peripheral Trigger Generator (PTG) coordinates events among peripherals on advanced 16-bit PIC® MCUs and dsPIC® Digital Signal Controllers (DSCs). Designed to work with the Analog-to-Digital Converter (ADC), the Output Compare/Pulse Width Modulation (PWM) module, general-purpose timers, and the interrupt controller, the PTG is capable of generating a complex sequence of events not easily replicated by software.
At the end of this tutorial, you should be able to describe the key features of the PTG and program the PTG.
Table of Contents
- Overview of the PTG
- PTG Commnads
- Initializing the MCU Peripherals
- Accessing the PTG Registers
- Adjust, Hold, and Limit Registers
- Setting up the Sequence Timing
- Initializing the Trigger Pulse Width
- Enabling and Starting the PTG
- Programming the Step Queue
- Starting and Stopping the PTG
- Application Example using the PTG