English
Language : 

DSPIC33EPXXXGP50X Datasheet, PDF (340/504 Pages) Microchip Technology – 16-bit Microcontrollers and Digital Signal Controllers (up to 256 KB Flash and 32 KB SRAM) with High-Speed PWM, Op amps, and Advanced Analog
dsPIC33EPXXXGP50X, dsPIC33EPXXXMC20X/50X, AND PIC24EPXXXGP/MC20X
24.4 STEP Commands and Format
TABLE 24-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 CMD<0>: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 OPTION3<:0>
100x PTGTRIG
Generate individual trigger output as described by
<<CMD<0>:OPTION<3:0>>
101x PTGJMP
Copy the value indicated in <<CMD<0>: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 <<CMD<0>: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 <<CMD<0>: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 24-2 for the trigger output descriptions.
3: This feature is only available on dsPIC33EPXXXMC20X/50X and PIC24EPXXXMC20X devices.
DS70657D-page 340
Preliminary
© 2011 Microchip Technology Inc.