| Electronic Components Datasheet Search |
|
51795B Datasheet(PDF) 23 Page - Microchip Technology |
|
|
|||||||||||||||||||||||||||||
51795B Datasheet(HTML) 23 Page - Microchip Technology |
|
23 / 100 page ![]() Theory of Operation 2010 Microchip Technology Inc. DS51795B-page 23 2.6.1 Sequence of Operations Leading to Debugging Given that the requirements for debugging (see previous section) are met, these actions can be performed when the PICkit 3 programmer/debugger is set as the current debugger from the MPLAB IDE menu (Debugger>Select Tool>PICkit 3): • The application code is compiled/assembled by selecting Project>Build Configuration>Debug. • When Debugger>Program is selected, the application code is programmed into the device’s memory via the ICSP protocol as described above. • A small “debug executive” program is loaded into the high area of program memory of the target device automatically by MPLAB IDE. Since the debug executive must reside in program memory, the application program must not use this reserved space. Some devices have special memory areas dedicated to the debug executive. Check your device data sheet for details. • Special “in-circuit debug” registers in the target device are enabled. These allow the debug executive to be activated by the debugger. • The target device is held in Reset by keeping the VPP/MCLR line low. 2.6.2 Debugging Details Figure 2-7 illustrates the PICkit 3 programmer/debugger system when it is ready for debugging. FIGURE 2-7: PICkit™ 3 DEBUGGER READY FOR DEBUGGING Typically, in order to find out if an application program will run correctly, a breakpoint is set early in the program code. When a breakpoint is set from the user interface of MPLAB IDE, the address of the breakpoint is stored in the special internal debug registers of the target device. Commands on PGC and PGD communicate directly to these registers to set the breakpoint address. Next, the Debugger>Run function or the Run icon (forward arrow) is usually pressed from MPLAB IDE. The debugger will then tell the debug executive to run. The target will start from the Reset vector and execute until the Program Counter reaches the breakpoint address previously stored in the internal debug registers. After the instruction at the breakpoint address is executed, the in-circuit debug mechanism of the target device “fires” and transfers the device’s Program Counter to the debug executive (much like an interrupt) and the user’s application is effectively +5V +12V 4.7 k 4.7 k Internal Circuits Program Memory File Registers Internal Debug Registers VPP/MCLR PGC PGD 1 5 4 Executive Debug Area Used by Target be Running must for Debug Executive to Function Area VDD Hardware Stack Shared by Debug Exec Debug Exec Reserved for Debug Executive |
|
Link URL |
| Does ALLDATASHEET help your business so far? [ DONATE ] |
About Alldatasheet | Advertisement | Contact us | Privacy Policy | Link to Datasheet | Link Exchange | Manufacturer List All Rights Reserved©Alldatasheet.com |
| Russian : Alldatasheetru.com | Korean : Alldatasheet.co.kr | Spanish : Alldatasheet.es | French : Alldatasheet.fr | Italian : Alldatasheetit.com Portuguese : Alldatasheetpt.com | Polish : Alldatasheet.pl | Vietnamese : Alldatasheet.vn Indian : Alldatasheet.in | Mexican : Alldatasheet.com.mx | British : Alldatasheet.co.uk | New Zealand : Alldatasheet.co.nz |
|
Family Site : ic2ic.com |
icmetro.com |