Datasheet

2013-2014 Microchip Technology Inc. DS70000689D-page 351
dsPIC33EPXXXGM3XX/6XX/7XX
25.2 PTG Control Registers
REGISTER 25-1: PTGCST: PTG CONTROL/STATUS REGISTER
R/W-0 U-0 R/W-0 R/W-0 U-0 R/W-0 R/W-0 R/W-0
PTGEN PTGSIDL PTGTOGL —PTGSWT
(2)
PTGSSEN PTGIVIS
bit 15 bit 8
R/W-0 HS-0 U-0 U-0 U-0 U-0 R/W-0 R/W-0
PTGSTRT PTGWDTO
—PTGITM1
(1)
PTGITM0
(1)
bit 7 bit 0
Legend: HS = Hardware Settable bit
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0
-n = Value at POR ‘1’ = Bit is set ‘0’ = Bit is cleared x = Bit is unknown
bit 15 PTGEN: PTG Module Enable bit
1 = PTG module is enabled
0 = PTG module is disabled
bit 14 Unimplemented: Read as ‘0
bit 13 PTGSIDL: PTG Stop in Idle Mode bit
1 = Discontinues module operation when device enters Idle mode
0 = Continues module operation in Idle mode
bit 12 PTGTOGL: PTG TRIG Output Toggle Mode bit
1 = Toggles the state of the PTGOx for each execution of the PTGTRIG command
0 = Each execution of the PTGTRIG command will generate a single PTGOx pulse determined by the
value in the PTGPWDx bits
bit 11 Unimplemented: Read as ‘0
bit 10 PTGSWT: PTG Software Trigger bit
(2)
1 = Triggers the PTG module
0 = No action (clearing this bit will have no effect)
bit 9 PTGSSEN: PTG Enable Single-Step bit
1 = Enables Single-Step mode
0 = Disables Single-Step mode
bit 8 PTGIVIS: PTG Counter/Timer Visibility Control bit
1 = Reads of the PTGSDLIM, PTGCxLIM or PTGTxLIM registers return the current values of their
corresponding Counter/Timer registers (PTGSD, PTGCx, PTGTx)
0 = Reads of the PTGSDLIM, PTGCxLIM or PTGTxLIM registers return the value previously written to
those PTG Limit registers
bit 7 PTGSTRT: Start PTG Sequencer bit
1 = Starts to sequentially execute commands (Continuous mode)
0 = Stops executing commands
bit 6 PTGWDTO: PTG Watchdog Timer Time-out Status bit
1 = PTG Watchdog Timer has timed out
0 = PTG Watchdog Timer has not timed out.
bit 5-2 Unimplemented: Read as0
Note 1: These bits apply to the PTGWHI and PTGWLO commands only.
2: This bit is only used with the PTGCTRL Step command software trigger option.