29 Peripheral Trigger Generator (PTG)

The PIC32AK1216GC41064 family Peripheral Trigger Generator (PTG) module is a user-programmable sequencer that is capable of generating complex trigger signal sequences to coordinate the operation of other peripherals. The PTG module interfaces with other modules, such as an Analog-to-Digital Converter (ADC), output compare and PWM modules, timers and interrupt controllers.

The PTG consists of the following key features:

  • Behavior is Step Command Driven:
    • Step commands are eight bits wide
  • Commands are Stored in a Step Queue:
    • Queue depth is up to 32 entries
    • Programmable Step execution time (Step delay)
  • Supports the Command Sequence Loop:
    • Can be nested one-level deep
    • Conditional or unconditional loop
    • Two 16-bit loop counters
  • Up to 16 Hardware Input Triggers:
    • Sensitive to either positive or negative edges, or a high or low level
  • One Software Input Trigger
  • Generates up to 32 Unique Output Trigger 
Signals
  • Generates Two Types of Trigger Outputs:
    • Individual
    • Broadcast
  • Strobed Output Port for Literal Data Values:
    • 5-bit literal write (literal part of a command)
    • 16-bit literal write (literal held in the PTGL0 register)
  • Generates up to Ten Unique Interrupt Signals
  • Two 16-Bit General Purpose Timers
  • Flexible Self-Contained Watchdog Timer (WDT) to Set an Upper Limit to Trigger Wait Time
  • Single-Step Command Capability in Debug mode
  • Configurable Clock from Dedicated Clock Generator module
  • Programmable Clock Divider