Datasheet
2013-2014 Microchip Technology Inc. DS70000689D-page 361
dsPIC33EPXXXGM3XX/6XX/7XX
25.3 Step Commands and Format
TABLE 25-1: PTG STEP COMMAND FORMAT
Step Command Byte:
STEPx<7:0>
CMD<3:0> OPTION<3:0>
bit 7 bit 4 bit 3 bit 0
bit 7-4
CMD<3:0>
Step
Command
Command Description
0000 PTGCTRL Execute control command as described by OPTION<3:0>
0001 PTGADD Add contents of PTGADJ register to target register as described by
OPTION<3:0>
PTGCOPY Copy contents of PTGHOLD register to target register as described by
OPTION<3:0>
001x PTGSTRB Copy the value contained in CMD0:OPTION<3:0> to the CH0SA<4:0> bits
(AD1CHS0<4:0>)
0100 PTGWHI Wait for a low-to-high edge input from selected PTG trigger input as described
by OPTION<3:0>
0101 PTGWLO Wait for a high-to-low edge input from selected PTG trigger input as described
by OPTION<3:0>
0110 Reserved Reserved
0111 PTGIRQ Generate individual interrupt request as described by OPTION<3:0>
100x PTGTRIG Generate individual trigger output as described by <<CMD0>:OPTION<3:0>>
101x PTGJMP Copy the value indicated in <<CMD0>:OPTION<3:0>> to the Queue Pointer
(PTGQPTR) and jump to that step queue
110x PTGJMPC0 PTGC0 = PTGC0LIM: Increment the Queue Pointer (PTGQPTR)
PTGC0
PTGC0LIM: Increment Counter 0 (PTGC0) and copy the value
indicated in <<CMD0>:OPTION<3:0>> to the Queue Pointer (PTGQPTR) and
jump to that step queue
111x PTGJMPC1 PTGC1 = PTGC1LIM: Increment the Queue Pointer (PTGQPTR)
PTGC1 PTGC1LIM: Increment Counter 1 (PTGC1) and copy the value
indicated in <<CMD0>:OPTION<3:0>> to the Queue Pointer (PTGQPTR) and
jump to that step queue
Note 1: All reserved commands or options will execute but have no effect (i.e., execute as a NOP instruction).
2: Refer to Table 25-2 for the trigger output descriptions.