Emulation Extension Pak (EEP) and Emulation Header User’s Guide 2014 Microchip Technology Inc.
Note the following details of the code protection feature on Microchip devices: • Microchip products meet the specification contained in their particular Microchip Data Sheet. • Microchip believes that its family of products is one of the most secure families of its kind on the market today, when used in the intended manner and under normal conditions. • There are dishonest and possibly illegal methods used to breach the code protection feature.
EEP AND EMULATION HEADER USER’S GUIDE Table of Contents Chapter 1. EEP and Emulation Header Overview 1.1 Emulation Extension Pak and Emulation Header Defined ............................. 5 1.2 Why Do I Need An Emulation Header? .......................................................... 6 1.3 Programming Notes ....................................................................................... 7 1.4 General Emulation Header Setup .................................................................. 8 1.
EEP and Emulation Header User’s Guide 5.4 Modular-to-SIL Adapter ................................................................................ 39 5.5 Ordering Information .................................................................................... 39 Index .............................................................................................................................41 Worldwide Sales and Service......................................................................................
EEP and Emulation Header User’s Guide Chapter 1. EEP and Emulation Header Overview NOTICE TO CUSTOMERS All documentation becomes dated, and this manual is no exception. Microchip tools and documentation are constantly evolving to meet customer needs, so some actual dialogs and/or tool descriptions may differ from those in this document. Please refer to our web site (www.microchip.com) to obtain the latest documentation available. Documents are identified with a “DS” number.
EEP and Emulation Header User’s Guide 1.2 WHY DO I NEED AN EMULATION HEADER? Although some devices have on-board debug circuitry to allow you to debug your code, you often lose device resources to debugging, i.e., debugging requires the use of two I/O lines, plus Vdd, Vss and Vpp, to communicate with the device. Using a debug header can free up these resources for your application. Using an emulation header gives you the benefits of a debug header plus new and powerful debugging features.
EEP and Emulation Header Overview 1.2.2 Standard Debug Features For information on standard debug features, see the user’s guide or online help file for your hardware debug tool: • PICkit 3™ in-circuit debugger • MPLAB ICD 3 in-circuit debugger • MPLAB REAL ICE™ in-circuit emulator Also see the Processor Extension Pak and Debug Header Specification (DS51292). 1.
EEP and Emulation Header User’s Guide 1.4 GENERAL EMULATION HEADER SETUP To set up your header, follow these instructions, before doing anything else: 1. Check the header box for any paper inserts that specify special operating instructions and the emulation header for any stickers (Figure 1-1). FIGURE 1-1: SPECIAL HEADER INSTRUCTIONS Emulation Header (Top) ION UT A C CAUTION 2. Set any jumpers or switches on the header to determine device functionality or selection as specified for that header.
EEP and Emulation Header Overview FIGURE 1-4: MPLAB® REAL ICE™ IN-CIRCUIT EMULATOR CONNECTIONS 4. Connect the header to the target board. On the bottom of the header is a socket that is used to connect to the target board.
EEP and Emulation Header User’s Guide 1.5 DEVICE VS. OPTIONAL HEADER FEATURES This document discusses the benefits of using an emulation header versus devices that have on-board debug capability or debug headers. Another resource for determining the differences in debug features is the Development Tool Selector (DTS). To find features by device: 1. 2. 3. 4. FIGURE 1-6: DS50002243A-page 10 In a web browser, go to: http://www.microchip.com/dtsapp/ Enter your device and click the Search button.
EEP and Emulation Header Overview 1.6 MPLAB X IDE USE WITH HEADERS Emulation header functionality is supported on MPLAB X IDE, but not on MPLAB IDE v8. Please use debug headers if you are still using MPLAB IDE v8. You need to do the following to use an emulation header on MPLAB X IDE: 1. Set up the emulation header as specified in “General Emulation Header Setup”. 2. Begin creating a project for a device supported by your emulation header using the Projects wizard (File>New Project).
EEP and Emulation Header User’s Guide NOTES: DS50002243A-page 12 2014 Microchip Technology Inc.
EEP and Emulation Header User’s Guide Chapter 2. Emulation Header Features 2.1 INTRODUCTION Emulation headers provide an array of debug features. The following requirements and advantages are discussed here: • • • • • • • • • 2.
EEP and Emulation Header User’s Guide 2.3 REAL TIME HARDWARE INSTRUCTION TRACE Note: This feature is only supported on the MPLAB REAL ICE in-circuit emulator. Real Time Hardware Instruction Trace is a real-time dump of the program execution stream that can be captured and analyzed. The functionality that is provided includes: • full instruction execution information up to 32 MHz • trace through Reset conditions • trace buffer with optional stall 2.3.
Emulation Header Features 2.3.2 Setting Up and Using Trace Trace requires hardware and software setup: 2.3.2.1 HARDWARE SETUP To use trace, you will need the ribbon cable and emulator interface board that comes with the emulation header. Connect one end to the emulation header (Figure 2-1). Connect the other end to the emulator. For more information on complete hardware setup and connections, refer to Section 1.4 “General Emulation Header Setup”.
EEP and Emulation Header User’s Guide 2.3.2.3 VIEWING TRACE DATA When trace is enabled and code is run, trace data will be collected by the emulator. Once the device is halted, trace data will be decoded and displayed in the Trace window (Window>Debugging>Trace). FIGURE 2-2: 2.3.3 TRACE WINDOW Improving the Trace Experience Remove as many USB devices from your PC USB ports as you can. This should improve trace throughput. DS50002243A-page 16 2014 Microchip Technology Inc.
Emulation Header Features 2.3.4 Trace Hardware Hardware details are shown in the following figures.
EEP and Emulation Header User’s Guide 2.4 HARDWARE ADDRESS/DATA BREAKPOINTS Up to 32 hardware address/data breakpoints are available to use on the emulation header. Software breakpoints are useful, but real hardware breakpoints are incomparable when you need unfettered control of qualifying the breakpoint/event conditions (beyond the simple address matching). Consider the addition of a special interrupt contextual qualifier and these hardware breakpoints offer a high degree of configurability.
Emulation Header Features 2.5 ENHANCED EVENT BREAKPOINTS For a definition of event breakpoints, see the MPLAB X IDE Help, “New Breakpoint Dialog”.
EEP and Emulation Header User’s Guide 2.7 EVENT COMBINERS An event combiner monitors multiple event inputs (currently breakpoints only) and can generate a halt or a trigger out that is based on combinations and sequences of those inputs. Emulation headers have four (4) Event Combiners and each combines eight (8) combinational or sequential events into a single event trigger. Individual breakpoints may be grouped into sequences, logical ‘AND’ lists, or a nested combination of these for more complex control.
Emulation Header Features 2.7.2 Complex Breakpoint Latched-And In addition to breakpoint sequences, a Latched-And (hardware AND) is available to AND a list of breakpoints. ANDed breakpoints can be useful when a variable is modified in more than one location and you need to break only when that variable is modified in one particular location. To create a Breakpoint Latch-And: 1. Right click on an existing breakpoint or shift click to select a group of existing breakpoints and right click on the group. 2.
EEP and Emulation Header User’s Guide 2.8 STOPWATCH CYCLE COUNTER The Stopwatch (32-bit Instruction) Cycle Counter has the ability to perform the existing basic instruction cycle counting (all instruction cycles counted) that exists on standard Enhanced Midrange parts. Note: The count units are in instruction cycles, not in instructions (as not all instructions execute in a single cycle). The stopwatch is available under Window>Debugging>Stopwatch. 2.
Emulation Header Features 2.11 TRIGGER IN/OUT The emulation header is capable of producing an output pulse for external triggering and detecting an input pulse for internal triggering. 2.11.1 Trigger In/Out Hardware Pins on the emulation header may be used for Trigger In/Out. Pin functions are labeled on the board silkscreen, namely: • GND – ground • TRIG IN – used for Trigger In • TRIG OUT – used for Trigger Out 2.11.
EEP and Emulation Header User’s Guide 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 Breakpoints”). 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.
EEP and Emulation Header User’s Guide Chapter 3. Emulation Header List 3.1 INTRODUCTION Currently available emulation headers and their associated -ME2 devices are shown below, organized by supported device. TABLE 1: OPTIONAL DEBUG HEADERS - PIC12/16 DEVICES Pin Count Header Part Number PIC16F1782 PIC16F1783 PIC16F1784 PIC16F1786 PIC16F1787 PIC16F1788 PIC16F1789 28 AC244064 PIC16F1789-ME2 5.
EEP and Emulation Header User’s Guide TABLE 1: OPTIONAL DEBUG HEADERS - PIC12/16 DEVICES (CON’T) Pin Count Header Part Number PIC16F1933 PIC16F1934 PIC16F1936 PIC16F1937 PIC16F1938 PIC16F1939 28 40/44 28 40/44 28 40/44 AC244055 PIC16LF1933 PIC16LF1934 PIC16LF1936 PIC16LF1937 PIC16LF1938 PIC16LF1939 28 40/44 28 40/44 28 40/44 Device DS50002243A-page 26 -ME2 Device Used PIC16F1939-ME2 VDD Max 5.5V 3.6V 2014 Microchip Technology Inc.
Emulation Header List 3.2 AC244055 3.2.1 Header Identification The header AC number is used for ordering the header. However, this number is not on the emulation header, as the board is often used for multiple headers by inserting different -ME2 devices. To identify this debug header, use the following information. Header -ME2 Device Board Assembly Number AC244055 PIC16F1939-ME2 02-10039 3.2.2 Header Setup and Operation For this header, you will need to select your device type using J5.
EEP and Emulation Header User’s Guide 3.2.3 Header Limitations See the “Limitations” section in your debug tool online Help file for details. Additionally, the following silicon errata applies to this header: Hardware Breakpoint Issue When using this emulation header with C language or Assembly language code, hardware breakpoints will not function past memory locations 0x3FF for the following emulated devices: • PIC16F1936, PIC16LF1936 • PIC16F1937, PIC16LF1937 Workarounds: 1.
Emulation Header List 3.2.4 Header Dimensions The figure below lists the dimensions for the emulation header. Dimensions are design values in inches. If the length and/or width of the emulation header is too large a footprint for the target board, consider using stand-offs, single in-line pins, transition sockets or other extenders in the header connection socket to raise the header above the target.
EEP and Emulation Header User’s Guide 3.3 AC244063 3.3.1 Header Identification The header AC number is used for ordering the header. However, this number is not on the emulation header, as the board is often used for multiple headers by inserting different -ME2 devices. To identify this debug header, use the following information. Header -ME2 Device Board Assembly Number AC244063 PIC16F1829-ME2 02-10212 3.3.
Emulation Header List 3.3.4 Header Dimensions The figure below lists the dimensions for the emulation header. Dimensions are design values in inches. If the length and/or width of the emulation header is too large a footprint for the target board, consider using stand-offs, single in-line pins, transition sockets or other extenders in the header connection socket to raise the header above the target.
EEP and Emulation Header User’s Guide 3.4 AC244064 3.4.1 Header Identification The header AC number is used for ordering the header. However, this number is not on the emulation header, as the board is often used for multiple headers by inserting different -ME2 devices. To identify this debug header, use the following information. Header -ME2 Device Board Assembly Number AC244064 PIC16F1789-ME2 02-10039 3.4.
Emulation Header List 3.4.4 Header Dimensions The figure below lists the dimensions for the emulation header. Dimensions are design values in inches. If the length and/or width of the emulation header is too large a footprint for the target board, consider using stand-offs, single in-line pins, transition sockets or other extenders in the header connection socket to raise the header above the target.
EEP and Emulation Header User’s Guide NOTES: DS50002243A-page 34 2014 Microchip Technology Inc.
EEP and Emulation Header User’s Guide Chapter 4. Emulation Header Target Footprints 4.1 INTRODUCTION To connect a debug header directly to a target board (without the use of a transition socket) the following information will be helpful. • DIP Device Footprints • TQFP/PLCC Device Footprints 4.2 DIP DEVICE FOOTPRINTS DIP device adapter footprints shown will accept adapter plugs like Samtec series APA plugs.
EEP and Emulation Header User’s Guide FIGURE 4-3: DOUBLE AND TRIPLE-ROW TQFP/PLCC FOOTPRINT 0.028 DIA PLATED-THRU HOLES 0.960 1.160 1.360 0.050 0.960 1.160 UNLESS OTHERWISE SPECIFIED, DIMENSIONS ARE IN INCHES. 1.360 Drawing of device is 64/68-pin, 80/84-pin and 100-pin Header pin-out matches the PLCC package. PLCC will map to TQFP as follows: Header to 44-pin TQFP – one-to-one mapping. DS50002243A-page 36 2014 Microchip Technology Inc.
EEP and Emulation Header User’s Guide Chapter 5. Emulation Header Connections 5.1 INTRODUCTION The different types of emulation header connectors are shown here, as well as information on connecting development tools to the header. The topics discussed here are: • • • • 5.
EEP and Emulation Header User’s Guide 5.3 6-PIN SIL CONNECTOR Emulation headers with 6-pin SIL (Single In-Line) connectors are compatible with the PICkit 3. The 6-pin modular cable attached to the Standard Driver Board may be connected to the 6 header pins through the Modular-to-SIL Adapter. The 8-pin socket of the High Speed Driver Board or optional Isolation Unit may be directly connected to the 6 header pins. Be sure to line up pin 1 on the board with pin 1 on the header.
Emulation Header Connections 5.4 MODULAR-TO-SIL ADAPTER You can use this adapter for a 6-pin modular connector to an 6-pin SIL connector. Ensure that you line up pin 1 of J1 with pin 1 of the 6-pin header connector. FIGURE 5-2: MODULAR-TO-SIL ADAPTER CONNECTION TOP J2 1 From Tool 1 6-Pin Header Connector J1 Modular Connector SIL Connector J1 J2 1 2 3 4 5 6 5.
EEP and Emulation Header User’s Guide NOTES: DS50002243A-page 40 2014 Microchip Technology Inc.
EEP AND EMULATION HEADER USER’S GUIDE Index Numerics 6-Pin Modular Connector ......................................... 37 6-Pin SIL Connector................................................. 38 A AC244055 ................................................................ 27 AC244063 ................................................................ 30 AC244064 ................................................................ 32 Additional Information ..............................................
EEP and Emulation Header User’s Guide V Vdd Max ................................................................... 25 Vddcore Max ............................................................ 25 DS50002243A-page 42 2014 Microchip Technology Inc.
Index NOTES: 2014 Microchip Technology Inc.
Worldwide Sales and Service AMERICAS ASIA/PACIFIC ASIA/PACIFIC EUROPE Corporate Office 2355 West Chandler Blvd. Chandler, AZ 85224-6199 Tel: 480-792-7200 Fax: 480-792-7277 Technical Support: http://www.microchip.com/ support Web Address: www.microchip.