You are on page 1of 18

Microchip Technology Inc.

Development Tools Update

PLEASE DO NOT DISTRIBUTE EXTERNALLY

July 2013 Page 1

Article Title
Author

Contents
Microchips XC-lent C Compilers World Wide Webinars Is MPLAB X IDE Too Automated for You? Theres a Doc for That! CCS Announces Support for MPLAB X Debuggers in the CCS IDE Proteus RTC Editions Available on microchipDIRECT MGC3130 Single Zone Development Kit Hillstar A Powerful New Wireless Tool Advanced Emulation Tool Offers Many New and Powerful Debugging Features New Analog Tools New Tools Best Sellers 2 2 3 4 5 6 7 8 9 15 17 18

October 2013

Microchip Technology Inc. Development Tools Update

PLEASE DO NOT DISTRIBUTE EXTERNALLY

October 2013 Page 2

Microchips XC-lent C Compilers


Jeff OKeefe Version 1.21 of MPLAB XC8 has just been released. This version adds support for new devices and fixes for a number of reported bugs. If you are new to MPLAB XC8, be sure to check out the new MPLAB XC8 Getting Started Guide which is bundled with this compiler. (You can also download this guide from Microchips web site.) This guide shows stepby-step instructions for creating a project in MPLAB X IDE and writing and compiling code. Examples cover accessing SFRs, configuration bits and interrupts. The MPLAB XC32 version 1.22 release has device-support file fixes and one major bug fix specific to MIPS16 devices and mod/div operations. As always, make sure you read the release notes packaged with your compiler for full information associated with these versions. The key new feature in these new versions of MPLAB XC8 and XC32 is function profiling. This feature can be used with the Power Monitor board and MPLAB X IDE to determine the energy consumption of code. When enabled, the compiler inserts additional instructions into the build output that can signal to the IDE when functions begin execution and when they exit. This gives an indication of the time in which a function is active. Together with power measurements by the Power Monitor board, these time stamps enable the energy consumption of each function to be calculated. This feature is handy if you wish to monitor the execution time of your code or know how long your batteries will last if you were to run your code on a portable device. Download the MPLAB X IDE Power Monitor plugin to be able to graphically display your power measurements and to monitor your hardwares power consumption. Although the Power Monitor board is currently available, the firmware (packaged with the IDE) to make this all happen is only just being rolled out. To use profiling, you must make sure that the version of MPLAB X IDE you are using supports function profiling for the compiler you are using. Not all firmware may have been updated by the time you read this article.

World Wide Webinars


Jeff OKeefe New Dev Tools webinars have been posted on Microchips Webinar site over the last quarter. You can also find some of the compiler and IDE webinars posted more prominently on the MPLAB X IDE and MPLAB Emulator and Debug Accessories web pages. MDB: The Microchip Command-line Debugger MPLAB X IDE allows you to graphically interface to your favorite hardware debugger or the simulator, but did you know that these same tools can be used from a command-line interface? MDB is a tool provided in the MPLAB X IDE distribution and which allows you to connect and interact with debuggers. As a command-line application, it is fast to execute and can be incorporated into scripts to automate repetitive tasks. But when human investigation is required, it still allows you to manually interact with the program being debugged, set breakpoints, step through code and examine memory. This webinar provides an overview of this tool, with basic use and more advanced examples shown using live screen captures. The MPLAB X Integrated Programming Environment Although you can program devices from Microchips MPLAB X Integrated Development Environment (IDE), the dedicated MPLAB Integrated Programming Environment, or IPE, offers many more programming features and, if programming is your only task, running this application is faster and comes with less overhead. The MPLAB IPE is especially suited to production programming and when multiple parts need to be programmed. Serialized quick-turn programming can be quickly configured using this application to program unique values into each device. Most aspects of this application are illustrated in this webinar, with screen shots and live screen capture demonstrations.

Microchip Technology Inc. Development Tools Update

PLEASE DO NOT DISTRIBUTE EXTERNALLY

October 2013 Page 3

Is MPLAB X IDE Too Automated for You?


Vince Sheard We try to make your job easier with the MPLAB X IDE by linking activities together with a single button press. Take for example, Build and Program. This is equivalent to Build Release, Program Release. Debug Run is equivalent to Build Debug, Program Debug, Launch Debugger. However sometimes this functionality may not be very obvious. At the recent MASTERs conference, several FAEs approached me to ask how to perform a certain function in MPLAB X previously available in MPLAB IDE v8. Although all the functionality in MPLAB IDE v8 is available in the MPLAB X IDE tool set, you might think that youve come across an example of a function not available in MPLAB X. Before you panic, please review the help area. Also, if you still have v8 installed, please validate that the function was indeed available in v8. If after your search you still believe that its not available in MPLAB X, call me and I will help you. One example of a feature previously available in v8 that is also available in MPLAB X is Bootloader Debugging. It might not be obvious that this feature is still available in MPLAB X because this feature is achieved by doing things a little differently. At times, debugging bootloaders may require that you change some memory on the image. You then run the bootloader to ensure that the memory was re-programmed. You do this by halting after the write and then read the memory back to verify that it has been written. Since we have streamlined all the build and debug functionality with MPLAB X for the majority of developers, some of the more specific tasks get lost. The way to achieve this feature in MPLAB X is to: 1. Build the project for Debug (Build Debug). This allows you to edit any memory object and change the data. 2. Program the debug image in the target, which essentially takes the existing memory from the IDE and programs it as is, plus the Debug executive (Program Debug). 3. Launch a debug session without reprogramming (Launch Debugger). 4. Select Launch Debugger from the drop-down menu under the Debug Run icon. These additional features have icons associated with them so they can be pulled out onto the toolbar if you tend to do this a lot. If not, you can just use the drop-down menus on the icons or use the high level menus under Debug>/Discrete Debugger operation. The following screenshots illustrate how to access these features: 1. Select Build for Debugging from the drop-down menu under the Build icon.

2. Or select the Clean and Build for Debugging from the drop-down menu under the Clean and Build icon.

3. Select Program Device for Debugging from the drop-down menu under the Program icon.

Microchip Technology Inc. Development Tools Update

PLEASE DO NOT DISTRIBUTE EXTERNALLY

October 2013 Page 4

An additional drop-down menu is also available under the Upload icon to allow you to read the device up into memory or export the device memory to a file.

One last tip: Did you know you can change the install path of the IDE during an installation and have as many versions of MPLAB X IDE installations on your PC as you would like? Each installation has its own persistence directory to remember its last configuration.

Theres a Doc for That!


Maggie Muller Dont understand a complex setup in MPLAB X IDE? Theres a doc for that! Dont understand how to hook up some hardware? Theres a doc for that, too! The MDB is invoked using the Command Prompt. Follow these steps to use MDB to program a device: 1. Select the device using the command Device [device name], for example, Device PIC18F66K22. 2. Use the set command to select any options like setting and watching breakpoints, etc. 3. Select the hardware tool (ICD 3, PICkit 3, Real ICE, PM3, Simulator, etc.). 4. Enter the Program command and the location of the cof, elf or hex file. When programming is complete, a Program succeeded message is returned. The other methodrunning a command fileis used if programming and debugging needs to be done frequently or repeatedly. This method saves time over entering commands if you have a lot of devices to program/debug. All the commands are put into a file. Then, the command file is included in the path when the MDB is invoked.

What is the Microchip Debugger?


The Microchip Debugger, or MDB, is a command-line program that facilitates programming and debugging devices, instead of using the Microchip MPLAB X IDE. Although you dont need the MPLAB X IDE to use the MDB, you do need to install MPLAB X IDE because the MDB is automatically installed with it. You will need to a cof/elf file for programming or debugging with the MDB, which can be generated with MPLAB X IDE or a third party compiler. If all youre doing is programming a device with the MDB, a hex file is sufficient. The file and hardware tool you want to use with MDB, however, cannot be active or open simultaneously in the MPLAB X IDE, IPE or third party program.

How Does MDB Work?


The MDB provides two methods of use: 1. By entering commands, or 2. By running a command file Generally, the method of entering commands is preferred. It allows interaction with the target application and the results of each command are displayed one at a time, enabling mistakes to be caught and corrected.

How to Find More Information on the MDB?


From within the MDB program, you can type help to display information on commands, hardware tools, etc. For more detailed information, see the Microchip Debugger (MDB) Users Guide located in <MPLAB X IDE Installation Directory> docs.

Microchip Technology Inc. Development Tools Update

PLEASE DO NOT DISTRIBUTE EXTERNALLY

October 2013 Page 5

CCS Announces Support for MPLAB X Debuggers in the CCS IDE


Guy McCarthy CCS, Inc., a Premier 3rd Party Partner and leader in Microchip PIC MCU development solutions, announced recently that the CCS integrated development environment (IDE) now supports MPLAB X in-circuit debugger and programmer solutions. This advantage allows engineers the flexibility to seamlessly use Microchip or CCS hardware tools in the CCS IDE for 8-bit and 16-bit microcontroller debugging and programming. The supported Microchip tools include the MPLAB ICD 3 In-Circuit Debugger, the MPLAB REAL ICE In-Circuit Emulator, the PICkit 3 In-Circuit Debugger, and Microstick II. CCS used the MPLAB X Software Development Kit (SDK), which enables third party tool vendors to develop applications that interact with MDBcore, the headless engine inside of MPLAB X IDE. CCS joins a growing list of tool vendors, including Labcenter Electronics (maker of Proteus) and LDRA, who have developed advanced applications using MDBcore. The CCS IDE is included with their PCWHD compiler for 8-bit and 16-bit MCUs (part number SW500024). The CCS IDE offers many advanced features, including a C Profiler tool, Code Metrics Calculator, Automatic Code Documentation Generator, and Flowchart editor. CCS compilers can also be used within MPLAB X IDE, thanks to a free plug-in that is readily available (see the informative video). Customers now have the flexibility to use the renowned CCS compiler with MPLAB debuggers in either IDE. Microchip FAEs and consultants are welcome to download and use the CCS compiler and IDE free of charge. Simply register for downloads and support at ccsinfo.com/fae.

The CCS C Profiler provides detailed information on execution times for every function.

Microchip Technology Inc. Development Tools Update

PLEASE DO NOT DISTRIBUTE EXTERNALLY

October 2013 Page 6

Proteus RTC Editions Available on microchipDIRECT


Guy McCarthy Labcenter Electronics has worked with Microchips Technical Training Group (TTG) to make special versions of the popular Proteus Design Suite available on microchipDIRECT. These versions contain everything you need to develop, simulate and test your embedded system designs based around selected Microchip microcontrollers. The Proteus VSM system level simulator is used alongside MPLAB X IDE in many of the Microchip RTC classes. Each purchase includes a professional copy of the ISIS schematic capture package, the VSM simulation engine, a full set of virtual instruments, and thousands of embedded peripheral models. The software integrates easily with the MPLAB X IDE, acting as virtual hardware during debugging and provides you with the ability to simulate the execution of your firmware without the need for a physical prototype.

Proteus VSM RTC Edition (8-Bit)


Proteus VSM for RTC 8-Bit Bundle licenses all of the 8-bit processor variants that are used in the RTC classes: PIC16F506 PIC16F1937 PIC18F46K22

Proteus VSM RTC Edition (16-Bit)


Proteus VSM for RTC 16-Bit Bundle licenses all of the 16-bit processor variants that are used in the RTC classes: PIC24FJ64GA004 PIC24FJ128GA010 dsPIC33FJ12GP202

The Proteus VSM simulator is tightly integrated with MPLAB X IDE

Microchip Technology Inc. Development Tools Update

PLEASE DO NOT DISTRIBUTE EXTERNALLY

October 2013 Page 7

MGC3130 Single Zone Development Kit Hillstar


Youssef Ghannouchi The Hillstar Development Kit is designed to support an easy integration of Microchips MGC3130 3D Tracking and Gesture Controller into customer applications. It provides MGC3130 system setup, related hardware and software references. Hillstar hardware builds a complete MGC3130 reference system consisting of three individual PCBs: MGC3130 Module I2C to USB Bridge Module Reference Electrode with a 95 x 60 mm sensitive area With the included MGC3130 Software Packagewhich contains the Aurea Graphical User Interface and GestIC Library, the MGC3130 Software Development Kit (SDK), PIC18 Host Reference code and a set of electrode reference designsthe Hillstar Development Kit makes it easy to design in the MGC3130 using these five steps: 1. Feature Definition 2. Electrode Design 3. MGC3130 Parameterization 4. Host Application Programming 5. Verification The Hillstar Development Kit can be used as a standalone GestIC system and evaluated in conjunction with the Aurea PC software. The latest MGC3130 packages can be downloaded from Microchips web site at www.microchip.com/GestICGettingStarted. Hillstar Development Kit packages can be ordered now: Part Number: DM160218 Price: $179.00

Kit Deliverables and Collateral:


The Hillstar Development Kit package contains the following items: MGC3130 Module I2C to USB Bridge Module 4-layer reference electrode (95 x 60 mm sensitive area) Hand brick set (self-assembly, four foam blocks, one copper foil) for parameterization and performance evaluation purposes. USB Cable for PC connection

MGC3130 Hillstar Hardware References:


The Hillstar Development Kit includes a collection of layout references (Gerber files) for electrode designs and ready-to-use sensor modules with MGC3130 backside assembly. The following electrode designs are included: 140 x 90 mm sensitive area - outline 168 x 119 mm 95 x 60 mm sensitive area - outline of 120 x 85 mm 80 x 80 mm sensitive area - outline 104 x 104 mm 100 x 50 mm sensitive area - outline 128 x 72 mm 50 x 30 mm sensitive area - outline 63 x 47 mm 30 x 30 mm sensitive area - outline 49 x 49 mm

Sensor Modules 95 x 60 mm sensitive area - outline of 120 x 85 mm 30 x 30 mm sensitive area - outline 49 x 52 mm

Design Support:
Useful software, code examples and documentation are available on the web at http://www.microchip.com/gesticgettingstarted. Internal Microchip information including MGC3130 software and documentation, feedback to the GestIC team (e.g. issue tracking), FAQ, and training materials and plans can be accessed on the GestIC SharePoint page at http://mchpweb-2010/eng/HMID/gestic/SitePages/default.aspx.

Microchip Technology Inc. Development Tools Update

PLEASE DO NOT DISTRIBUTE EXTERNALLY

October 2013 Page 8

A Powerful New Wireless Tool


Erin Hasulak WPDs newest development tool is getting a lot of attention, and for good reason! The MiWi to Wi-Fi Gateway Demo Kit (part number DM182018) integrates the MiWi wireless networking protocol with Microchips Wi-Fi TCP/IP stack on a single PIC MCU, cleverly bridging the data from a MiWi network to the ubiquitous internet. The ability to bridge MiWis low power, low data rate, and mesh network capability to a standard Wi-Fi protocol is a powerful tool. With the Gateway Demo, data from hundredseven thousandsof sensors can be accessed from anywhere. The demo kit includes a wireless host gateway board with both the MiWi and Wi-Fi transceiver modules. It also includes two MiWi demo boards to create a three node MiWi protocol network. The gateway board connects over Wi-Fi to a client device, such as a laptop, tablet, or smartphone or directly to an access point. Data from the MiWi protocol nodes is monitored and displayed via Wi-Fi on the client device. The Gateway Demo (Part #DM182018) is available today from microchipDIRECT for $169.00 USD.

Features:
MiWi stack support MiWi, MiWi P2P and MiWi Pro Wi-Fi stack support on Wireless Evaluation Board Feature-packed PIC32 MCU on Wireless Evaluation Boards to run MiWi and Wi-Fi protocol stacks PIC18F46J50 MCU featuring nanoWatt XLP Technology for MiWi Nodes MRF24J40MA FCC/IC/ETSI certified module MRF24WG0MA FCC/IC/ETSI certified module for IEEE 802.11 b/g MCP9700A temperature sensor LCD display to develop interactive wireless demos (Removable for lower power) Board can be powered by AAA batteries, 9V power supply, external power supply, or USB

Demo Kit Contents:


One Wireless Evaluation Board with a 2.4 GHz MRF24J40MA and a 2.4 GHz MRF24WG0MA (Wi-Fi) Transceiver Two MiWi Demo Boards with a 2.4 GHz MRF24J40MA Transceiver 6-pin ICSP header USB mini-B cable for power supply Four AAA batteries

Demo Software:
The demo software can be downloaded from the Microchip Libraries of Applications at www.microchip.com/MLA. After installing the MLA, you can find the demo source code at \Microchip Solutions\Combo folder

Microchip Technology Inc. Development Tools Update

PLEASE DO NOT DISTRIBUTE EXTERNALLY

October 2013 Page 9

Advanced Emulation Tool Offers Many New and Powerful Debugging Features
Ken Pergola Microchip returns to its emulator system roots with the introduction of its Enhanced Midrange family PIC16(L)F1939 Emulation Extension Pak (part number AC244055, $50.00). This low-cost, second-generation in-circuit emulator system (ME2), when paired with a MPLAB REAL ICE, MPLAB ICD 3, or PICkit 3 tool, offers a toolbox full of emulation/debugging features for assisting customers with their tough code debugging jobs. Never before has Microchip offered this level of competitive and powerful emulation/debugging features at such a low price point. Execution out-of-bounds detection Breakpoints, trace, stack snapshots, triggers, and event combiners are driven by a common set of events that can feed each other to create complex triggering mechanisms for each feature Low-cost, single-product solution for emulating all PIC16(L)F1933/4/6/7/8/9 Enhanced Midrange devices (across 1.8 to 5.5 volt range, up to 32 MHz operational speed as specified in the PIC16F1939 family data sheets). The PIC16(L)F1939 Emulation Extension Pak comprises the Emulation Header board, the trace cable, the trace adapter board, and the gold SIP pins (pictured) and should be available for sale on microchipDIRECT in October. At this writing, introductory yellow-light support is available starting in MPLAB X IDE v1.90 for MPLAB REAL ICE only, with MPLAB ICD 3 and PICkit 3 tool support expected in future releases. To find out which of the above emulation features are expected to be phased into future MPLAB X IDE releases, please read the Functional Overview section that follows. How can this brand new emulation product help our customers? The PIC16(L)F1939 Emulation Extension Pak offers many new and powerful debugging features that give customers more choices to pick the right debugging feature(s) to solve the debugging task at hand efficiently at a minimal price. Time is money and engineers who are outfitted with powerful and easy-to-use advanced debugging solutions are better able to meet their companys ever decreasing product design life cycle schedules.

Features:
Real-time hardware instruction trace (up to MCUs full 32 MHz operational speed) 32 powerful hardware address/data breakpoints Enhanced event breakpoints 32 runtime data watch points Background debug mode (provides runtime ability to read/write RAM/SFRs and set breakpoints) Four Event Combiners (modelled after MPLAB ICE 2000 complex trigger machine) Hardware stack snapshot External trigger I/O Enhanced stopwatch cycle counter Previous program counter (PC) query

Functional Overview:
The PIC16(L)F1939 Emulation Extension Pak offers capabilities far beyond Microchips existing Enhanced Midrange lineage of debug headers formally known as Processor Extension Paks. Comparing and contrasting these two debugging solutions is beyond the scope and purpose of this short article. The main focus of this article is to give a brief introduction primarily of the exciting new capabilities of the PIC16(L)F1939 Emulation Extension Pak.

Microchip Technology Inc. Development Tools Update Event Sources

PLEASE DO NOT DISTRIBUTE EXTERNALLY

October 2013 Page 10

Its all about events with the PIC16(L)F1939 Emulation Extension Pak, so its best to introduce them now before delving into the various debug/emulation features which employ them. Breakpoints, trace, stack snapshots, triggers, and event combiners are driven by a common set of events that can feed each other to create complex triggering mechanisms for each feature. This common set (pool) of event sources is as follows: RESET instruction External halt (initiated by development tool) Device wake-up Stack overflow Stack underflow SLEEP instruction Watchdog timer reset Software breakpoint External trigger In signal MCLR reset Execution out-of-bounds condition Interrupt entry Interrupt exit Each of the four Event Combiners Each of the 32 hardware breakpoints

CPU stall to keep up with tough to trace programs. External Trigger In signal can initiate a trigger trace packet (or marker) in the trace data stream.

MPLAB X IDE Trace Display Window

Powerful Hardware Address/Data Breakpoints Up to 32 powerful hardware address/data breakpoints are available to use on the PIC16(L)F1939 Emulation Extension Pak. Software breakpoints are useful, but theres nothing like real hardware breakpoints when you need unfettered control of qualifying the breakpoint/event conditions beyond the simple address matching that simple software breakpoints provide. Add to the mix a special interrupt contextual qualifier and these hardware breakpoints offer a high degree of configurability for our customers. With the PIC16(L)F1939 Emulation Extension Pak, using the term breakpoint is now a bit limiting, so at this point the concept of events can be introduced to augment the term breakpoint. Breakpoints are typically thought of as a mechanism to simply halt code execution but events need not actually halt code execution at all (although they still can if desired) but rather, can initiate some type of action while code is still running. For example, a watchdog timer reset event (breakpoint) need not halt execution anymore, but instead can be user-configured to generate a trigger out signal on the trigger out pin. Additionally, our ME2 Architect cited a succinct and rather clever example of configuring a data memory breakpoint to only generate a trigger out pulse in a routine that receives

Each of these event sources can be used to start/stop the Stopwatch Cycle Counter, set/reset an Event Combiner stage, start/stop Instruction Trace, or take a Stack Snapshot. Real-time Hardware Instruction Trace One of the PIC16(L)F1939 Emulation Extension Paks bragging rights is its real-time hardware instruction trace capability. Certain code troubleshooting situations lend themselves very well to gathering instruction trace data in order to find the root cause quickly and efficiently. The PIC16(L)F1939 Emulation Extension Pak can help customers bugs disappear with a trace: Up to full 32 MHz MCU operational speed. Ability to trace through reset conditions. Any event from the common event source pool can start/stop trace.

Microchip Technology Inc. Development Tools Update

PLEASE DO NOT DISTRIBUTE EXTERNALLY

October 2013 Page 11

UART data bytes. An external frequency counter can then be used to determine the data rate of the communications. Some notable breakpoint features: 32 available address/data hardware breakpoints. Address range breakpoints (break within data or program memory address ranges). Data-Masking qualifier for data breakpoints (allows bit-field breakpoints). Data-Comparison qualifier for data breakpoints: = (equality), (inequality), < (less than), and > (greater than). Interrupt Context qualifier for address/data breakpoints (break in ISR code only, main code only, or both ISR and main code). Trigger Out qualifier for address/data breakpoints (generate a trigger out signal on event condition). Pass Count qualifier for address/data breakpoints (break on event condition occurring N times). Data breakpoints trigger on both normal and linear address modes. Breakpoints and other events can trigger without halting execution and can be used as trigger events to other features. A sample of some breakpoint options in MPLAB X IDE:

Enhanced Event Breakpoints The PIC16(L)F1939 Emulation Extension Pak introduces a new twist on what MPLAB X IDE has traditionally presented as Event Breakpoints in that you can assign a specific action to each of the following Event Breakpoints: RESET instruction SLEEP instruction Stack overflow/underflow Device wake-up Watchdog timer reset Execution out-of-bounds MCLR reset External Trigger In signal Software Breakpoint

The specific action that can be assigned to each of the above event breakpoints can be one of three choices: 1. Break (halt code execution only) 2. Trigger out (initiate a pulse on the Trigger Out pin only) 3. Break and trigger out (both halt code execution and initiate a pulse on the Trigger Out pin) Background Debug Mode The PIC16(L)F1939 Emulation Extension Paks onboard ME2 silicon contains a Background Debug Mode control interface that allows read/ write access to user RAM memory, SFRs, and emulation registers while the user program is running or even sleeping! Why is this significant? In some cases, stopping the user application in order to view and modify registers can cause damage to the system being debugged, or disrupt application functions to the extent

Microchip Technology Inc. Development Tools Update

PLEASE DO NOT DISTRIBUTE EXTERNALLY

October 2013 Page 12

that debugging is actually counterproductive. For example, halting applications with communications between multiple microprocessors can lead to unrecoverable communications errors. Background Debug Mode capability includes: Allows Reading and Writing of RAM and Peripheral SFRs while device is executing code without disturbing execution. Allows Reading and Writing of RAM and Peripheral SFRs while device is in sleep. Allows Reading of the 16-level stack area while executing. Captures Stack Snapshot. Allows runtime/sleep time changes of In-Circuit Debug (ICD) settings and breakpoints (i.e. runtime address/data/complex/event breakpoints). Noticeably faster single-stepping speeds at lower MCU operating frequencies. Event Combiners An event combiner monitors multiple event inputs (from the event source pool) and can generate a halt or a trigger out based on combinations and sequences of those inputs. The PIC16(L)F1939 Emulation Extension Pak has four Event Combiners and each combines eight 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. The Event Combiners were modelled after the legacy MPLAB ICE 2000 complex triggers. Hardware Stack Snapshot The PIC16(L)F1939 Emulation Extension Pak has the ability to take a snapshot of the entire 16-level hardware stack area (including the stack pointer and program counter) by either a user-initiated snapshot or asynchronous event-triggered snapshot (via any event from the common event source pool). The stack area can then be inspected to ascertain code flow history.

Previous Program Counter (PC) Query The Previous PC feature captures the value of the Program Counter of the instruction that preceded the instruction which caused the actual break. For example, if a breakpoint occurs at the first instruction of a subroutine or the destination of a branch a query of the Previous PC will indicate the address of the calling or branch instruction. Additionally, if a code execution out-of-bounds halt occurs, a query of the Previous PC will indicate the address of the instruction that changed the PC. The breakpoint address stored in the stack will be the erroneous PC value that triggered the out-of-bounds condition. Execution Out-of-Bounds Detection Firmware on safety-critical systems needs to be rock-solid, and assurance that rogue code can be detected is paramount in these applications. The PIC16(L)F1939 Emulation Extension Pak can be used to detect out-of-bounds execution of code. Out-of-bounds code execution is detected by an event breakpoint that watches for PC values that exceed the available program memory of the emulated MCU. The out-of-bounds code execution condition is typically caused by a computed GOTO or CALL that erroneously computes the index, or by loading PCLATH with an incorrect value. Once code is halted due to the execution out-of-bounds event breakpoint the Previous PC functionality can be used to identify the offending instruction. Runtime Data Watch Points, Up to 32 runtime data watch points are available on PIC16(L)F1939 Emulation Extension Pak to allow visibility into SFR/variable changes while code is executing. Since the runtime data watch points use the Emulation Extension Paks trace hardware functionality, this feature requires the use of the MPLAB REAL ICE tool. Each runtime data watch point consumes a hardware breakpoint resource.

Microchip Technology Inc. Development Tools Update

PLEASE DO NOT DISTRIBUTE EXTERNALLY

October 2013 Page 13

Enhanced Stopwatch Cycle Counter (32-bit Instruction Cycle Counter) The Stopwatch Cycle Counter has the ability to perform the existing basic instruction cycle counting (all instructions cycles counted) that exists on standard Enhanced Midrange parts as well as brand new enhanced modes: Only instruction cycles within the interrupt handler will be counted. Only instruction cycles outside the interrupt handler will be counted. Any event from the common event source pool can start or stop the Stopwatch Cycle Counter. NOTE: The count units are in instruction cycles, not in instructions (as not all instructions execute in a single cycle). External Trigger I/O One trigger input and one trigger output pin are available to the user externally on the PIC16(L)F1939 Emulation Extension Paks board. The trigger I/O allows the customer a lot of flexibility to generate or respond to various event conditions via externally-interfaced hardware or test equipment. Trigger In Used to generate a trigger condition, halt and/or trigger out signal when a falling edge occurs on the trigger input pin. Trigger In features: A trigger in pulse can be used to start/stop the Stopwatch Cycle Counter, set/reset an Event Combiner stage, start/stop Instruction Trace, take a Stack Snapshot, or generate a trigger trace packet (or marker) in the trace data stream. Programmable trigger in polarity (rising/falling edge generates a halt or trigger condition). Programmable Noise reduction/pulse reject filter enable (helps mitigate spurious triggers from halting code).

Trigger Out When an event, such as a breakpoint, occurs with an enabled trigger, a positive going pulse on the trigger out pin is generated. Numerous sources can initiate a Trigger out pulse: Each of the 32 hardware breakpoints Software breakpoint Each of the four Event Combiners Trigger test RESET instruction SLEEP instruction Stack overflow or underflow Device wake-up Watchdog timer reset Execution out-of-bounds condition MCLR reset Trigger In signal Halt External halt (initiated by development tool)

A handy feature regarding the trigger out signal is that its duration can last as long as the occurring 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 this super simple all without employing the old-school technique of writing a single line of (special, non-production) code to wiggle an I/O pin:
; ; ; ; ; ; ----------------------------------------------------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.

Microchip Technology Inc. Development Tools Update

PLEASE DO NOT DISTRIBUTE EXTERNALLY

October 2013 Page 14

; 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 ; -----------------------------------------------------

Programmable trigger out polarity (allows a negative going pulse to be generated on the trigger out pin upon a trigger condition occurring). Trigger test (allows a trigger out sanity check test by unconditionally forcing a trigger out pulse on the trigger out pin). Programmable slew rate control (allows the customer to enable/ disable slew rate limiting on the trigger out signal). NOTES:

Trigger Out features: Programmable one-shot mode (allows the trigger out pulse duration to be a fixed width regardless of MCU operating frequency, or the length of the event itself, which is MCU frequency-dependent).

MPLAB ICD 3 and PICkit 3 tool support planned for a future MPLAB X IDE release. Feature requires MPLAB REAL ICE tool. Feature is expected in future MPLAB X IDE releases.

Microchip Technology Inc. Development Tools Update

PLEASE DO NOT DISTRIBUTE EXTERNALLY

October 2013 Page 15

New Analog Tools


Mark Palmer

UCS1002 Evaluation Board


Part Number: ADM00497 Price: $90.00 The UCS1002 is a programmable USB port power controller with charge emulation. The evaluation board allows the user to use a graphical user interface to demonstrate the Highest Current Algorithm, apply charger emulation profiles, and set up for full BC1.2 CDP, DCP, and SDP modes. Options in the GUI include custom profile register configuration, dead battery routines, charge ration operation, and configuration of fault handling.

Features:
Headers for connecting an external diode or CPU/GPU Resistance Error Correction verification USB-to-SMBus bridge for power and communications Capability to connect directly to an external SMBus master Accompanying Chip Manager software allows for viewing, changing, and saving of register values

UCS1001 Evaluation Board


Part Number: ADM00540 Price: $24.99 The UCS1001 Evaluation Board is intended for evaluation of stand-alone USB charging. The UCS1001 supports popular emulation profiles for Apple, Samsung, and BC1.2 compliant devices. Jumper configurations allow selection of operation for Dedicated Charging Emulation, Charging Downstream Port, Standard Downstream Port, and USB Pass Through. Note that this replaces previous product ADM00496.

Features:
Graphical user interface for control of all functions Built-in Highest Current Algorithm demonstration Charge ration and current measurement plot mode Capability to create custom emulation profiles Fully BC1.2 compliant

EMC1182 Temp Sensor Evaluation Board


Part Number: ADM00516 Price: $29.99 The EMC1182 Temp Sensor Evaluation Board provides the means to demonstrate all of the EMC1182s features, and allows the user to view and modify registers. LEDs indicating status information and test points are included to enable system voltages monitoring using a voltmeter or an oscilloscope. The board requires only one universal serial bus (USB) connection to power the board. The USB-to-SMBus bridge regulates the +5V USB power to +3.3V used by the EMC1182 and other evaluation board circuitry.

Features:
Dedicated charger emulation for popular downstream USB devices such as tablets and smart phones Configurable through jumper pins Selection of current limit and fault handling Fully BC1.2 compliant

Microchip Technology Inc. Development Tools Update

PLEASE DO NOT DISTRIBUTE EXTERNALLY

October 2013 Page 16

MCP16251 and MCP1640B Synchronous Boost Converters Evaluation Board


Part Number: ADM00458 Price: $14.99 The MCP16251 and MCP1640B Synchronous Boost Converters Evaluation Board demonstrates the MCP16251/MCP1640B in two boost-converter applications with multiple output voltages. It can be used to evaluate both package options (SOT-23-6 and 2x3 mm 8-(T)DFN). The board was developed to help engineers reduce the product design cycle time. Three common output voltages can be selected: 2.0V, 3.3V and 5.0V. The output voltage can be changed with a mini-dip switch that changes the external resistor divider. A switch connected to the EN pin is used to enable and disable the converters. When enabled, the MCP16251/MCP1640B will regulate the output voltage; when disabled, the MCP16251/MCP1640B disconnects the path from input to output for true-disconnect.

Features:
Can be powered by one-cell, two-cell, or three-cell alkaline, NiCd, NiMH, one-cell Li-Ion or Li-Polymer batteries Input voltage range (Vin ): 0.35V to 5.5V, with Vin Vout Fixed output voltage: 2.0V or 3.3V and 3.3V or 5.0V, selected using a mini-dip switch on board Output current: typical 125 mA @ 3.3V output, 1.5V input or 200 mA @ 5.0V output, 3V input Start-up voltage: 0.82V (for MCP16251s converter) or 0.65V (for MCP1640Bs converter) at Vout = 3.3V and Iout = 1 mA, resistive load Automatic PFM/PWM operation for the MCP16251 converter PWM Switching Frequency = 500 kHz Enable state, selectable using the mini-dip switch on board Peak Input Current Limit (800mA for MCP1640 or 650mA for MCP16251) Over-temperature protection

Microchip Technology Inc. Development Tools Update

PLEASE DO NOT DISTRIBUTE EXTERNALLY

October 2013 Page 17

New Tools
Sharon Baker AC164151 ADM00516 ADM00540 DM160218 DM182018 DM182020 DM183037 DM240015 DM320017 EVB88730 EVB-USB2642 SPI SRAM PICtail with Battery Backup EMC1182 Evaluation Board UCS1001 Evaluation Board MGC3130 Single Zone Development Kit Hillstar MiWi Protocol to Wi-Fi Wireless Demo Kit Wi-Fi Client Module Development Kit PIC18F67J94 Development Board MPLAB Starter Kit for PIC24F Intelligent Integrated Analog PIC32 CDMA M2M Development Platform LAN88730 Automotive Grade High-Speed MII/ RMII 10/100 Ethernet Transceiver Board USB2642 USB 2.0 2 Port Hub with UCS81001 Port Power Controller and Ultra Fast Flash Media Controller (MMC 4 and 8 bit SD) USB3613 3-port HSIC Up/Down USB 2.0 Hub Evaluation Board USB3813 3-port HSIC Down USB 2.0 Hub Evaluation Board MA330033 MA330035 SW006021-1H SW006021-1NH SW006021-2H SW006021-2NH SW320013-1 SW320013-2 SW320014-1 SW320014-2 dsPIC33EP512GM706 Single Motor Internal Op Amp PIM dsPIC33EP512GM710 General Purpose PIM MPLAB XC Standard High Priority Access MPLAB XC Standard High Priority Access (Floating License) MPLAB XC PRO High Priority Access MPLAB XC PRO High Priority Access (Floating License) AAC Decode Library (Non-modifiable Binary Code) AAC Decode Library (Source Code) PIC32 Bluetooth Audio Software Suite 1 PIC32 Bluetooth Audio Software Suite 2

EVB-USB3613 EVB-USB3813

AVAILABLE INTERNALLY (NOT VIA microchipDIRECT) PEGASUS-EVB Pegasus Mobile Embedded Controller Firmware Debugger Board

Microchip Technology Inc. Development Tools Update

PLEASE DO NOT DISTRIBUTE EXTERNALLY

October April 2013 Page 18

Best Sellers
Sharon Baker

Top 10 Development Tools


1 2 3 4 5 6 7 8 9 PG164130 DV164035 PG164120 DV164131 DV164120 DV244005 DV007004 DV164037 SW006021-2 PICkit 3 In-Circuit Debugger MPLAB ICD 3 Debugger Kit PICkit 2 Programmer PICkit 3 Debug Express PICkit 2 Starter Kit MPLAB REAL ICE MPLAB PM3 Programmer MPLAB ICD 3 and Explorer 16 Kit MPLAB XC8 PRO Compiler PICkit 2 Debug Express

Top 5 Analog Tools


1 2 3 4 5 MCP2515DM-BM ADM00310 PKSERIAL-I2C1 ADM00421 ADM00393 CAN Bus Monitor Demo Board MCP3903 Evaluation Board for 16-bit MCU PICkit Serial I2C Demo Board MCP2210 Evaluation Kit MCP2200 Breakout Module

Top 5 Demo Boards and Kits


1 2 3 4 5 DM320004 DM320002 DM330013-2 RN-171-EK DM320003-2 PIC32 Ethernet Starter Kit PIC32 Starter Kit Expansion MicroStick II RN171 Evaluation Kit PIC32 USB Starter Kit 2

10 DV164121

Trademarks
The Microchip name and logo, the Microchip logo, dsPIC, KEELOQ, KEELOQ logo, MPLAB, PIC, PICmicro, PICSTART, PIC32 logo, rfPIC and UNI/O are registered trademarks of Microchip Technology Incorporated in the U.S.A. and other countries. FilterLab, Hampshire, HI-TECH C, Linear Active Thermistor, MXDEV, MXLAB, SEEVAL and The Embedded Control Solutions Company are registered trademarks of Microchip Technology Incorporated in the U.S.A. Analog-for-the-Digital Age, Application Maestro, chipKIT, chipKIT logo, CodeGuard, dsPICDEM, dsPICDEM.net, dsPICworks, dsSPEAK, ECAN, ECONOMONITOR, FanSense, HI-TIDE, In Circuit Serial Programming, ICSP, Mindi, MiWi, MPASM, MPLAB Certified logo, MPLIB, MPLINK, mTouch, Omniscient Code Generation, PICC, PICC-18, PICDEM, PICDEM.net, PICkit, PICtail, REAL ICE, rfLAB, Select Mode, Total Endurance, TSHARC, UniWinDriver, WiperLock and ZENA are trademarks of Microchip Technology Incorporated in the U.S.A. and other countries. SQTP is a service mark of Microchip Technology Incorporated in the U.S.A. All other trademarks mentioned herein are property of their respective companies. 2013, Microchip Technology Incorporated, All Rights Reserved.