User manual
EEP and Emulation Header User’s Guide
DS50002243A-page 24 2014 Microchip Technology Inc.
2.11.3 Trigger Out Operation
A pulse can be output on the Trigger Out (TRIG OUT) pin based on a setting of either
a Program or Data Breakpoint (see Section 2.4 “Hardware Address/Data Break-
points”). The breakpoint may be set up so that the pulse is emitted without halting
device execution.
Set up Trigger Out by selecting Window>Debugging>Triggers
.
A handy feature of the trigger out signal is that its duration can last as long as the occur-
ring event. For example, if the customer needs to time the duration of the watchdog
timer (whose timeout period is user-programmable); the following code, in conjunction
with the trigger out and SLEEP event breakpoint features, can make timing an event
very simple without employing the old-school technique of writing a single line of
(special, non-production) code to wiggle an I/O pin.
The following code is an example:
; -----------------------------------------------------
; T R I G G E R O U T T E S T :
; T I M I N G T H E W A T C H D O G T I M E R
; -----------------------------------------------------
; 1) Ensure the watchdog timer configuration bit is enabled.
; 2) Set an Event Breakpoint (Break on SLEEP) to initiate a
: 'Trigger out' action only.
; 3) Connect your oscilloscope probe to the TRIGGER OUT pin and
; set up your oscilloscope to trigger on the rising edge.
; 4) Run the following code:
CLRWDT
NOP
NOP
SLEEP
; The expiration if the watchdog timer will wake up the MCU from
: sleep after ~2 seconds. The trigger out pulse high-time
; duration is the duration of the watchdog timer: ___---___
; Since the default watchdog timer period value is 2 seconds
: typical, the trigger out pulse measured on the oscilloscope
; should be approximately 2 seconds.
NOP
NOP
NOP
Loop_101:
BRA Loop_101
; -----------------------------------------------------
Selection Description
Polarity Trigger-in pin pulse polarity:
Positive: a positive-going pulse
Negative: a negative-going pulse
Slew Rate Limiting Limit the slew rate on the Trigger Out pulse.
Enable: slew rate is slow and limited
Disable: Slew rate is as fast as possible
One Shot The trigger out pulse duration is:
Enable: a fixed width, regardless of MCU operating frequency
Disable: the length of the event itself, which is MCU
frequency-dependent
Force Trigger Out Click this button to force a Trigger Out pulse.