Peripheral Trigger Generator - Step Commands

Step Command Format

There are eleven 8-bit Step commands available to the Peripheral Trigger Generator (PTG). Each of the Step commands has two fields:

  • CMD<3:0> - 4-bit description of the operation to be performed
  • OPTION<3:0> - parameter which clarifies either the source or destination operand.

Executing Step Commands

Step commands are executed from the PTG's queue. The commands are placed into the queue by the application program. This queue is typically programmed during the application's start-up process rather than the main loop. Depending upon which MCU is being used, between 8 and 32 Step commands can be programmed into the queue.

Once the queue is programmed the application will enable (PTGEN=1), then start (PTGSTRT=1) the PTG. The Step Queue Pointer Register PTGQPTR acts as a program counter controlling access to the PTG Step commands. When the PTG is enabled, PTGQPTR points to the first entry in the queue. The PTG sequentially decodes and executes instructions, incrementing PTGQPTR as each Step command is executed. Using the Jump Step commands, PTGQPTR can be altered to control program flow.

Step Command Details

 Learn More

 
Programming the PTG
Learn more >
 
Initializing the PTG
Learn more >
 
PTG Usage Examples
Learn more >
© 2016 Microchip Technology, Inc.
Information contained on this site regarding device applications and the like is provided only for your convenience and may be superseded by updates. It is your responsibility to ensure that your application meets with your specifications. MICROCHIP MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY KIND WHETHER EXPRESS OR IMPLIED, WRITTEN OR ORAL, STATUTORY OR OTHERWISE, RELATED TO THE INFORMATION, INCLUDING BUT NOT LIMITED TO ITS CONDITION, QUALITY, PERFORMANCE, MERCHANTABILITY OR FITNESS FOR PURPOSE. Microchip disclaims all liability arising from this information and its use. Use of Microchip devices in life support and/or safety applications is entirely at the buyer's risk, and the buyer agrees to defend, indemnify and hold harmless Microchip from any and all damages, claims, suits, or expenses resulting from such use. No licenses are conveyed, implicitly or otherwise, under any Microchip intellectual property rights.