Книга: Advanced PIC Microcontroller Projects in C

5.2.3 In-Circuit Debuggers

5.2.3 In-Circuit Debuggers

An in-circuit debugger is hardware connected between a PC and the target microcontroller test system used to debug real-time applications quickly and easily. With in-circuit debugging, a monitor program runs in the PIC microcontroller in the test circuit. The programmer can set breakpoints on the PIC, run code, single-step the program, and examine variables and registers on the real device and, if required, change their values. An in-circuit debugger uses some memory and I/O pins of the target PIC microcontroller during debugging operations. Some in-circuit debuggers only debug assembly language programs. Other, more powerful debuggers can debug high-level language programs.

This section discusses some of the popular in-circuit debuggers used in PIC18 microcontroller-based system applications.

ICD2

The ICD2, a low-cost in-circuit debugger (see Figure 5.17) manufactured by Microchip Inc., can debug most PIC microcontroller-based systems. With the ICD2, programs are downloaded to the target microcontroller chip and executed in real time. This debugger supports both assembly language and C language programs.


Figure 5.17: ICD2 in-circuit debugger

The ICD2 connects to a PC through either a serial RS232 or a USB interface. The device acts like an intelligent interface between the PC and the test system, allowing the programmer to set breakpoints, look into the test system, view registers and variables at breakpoints, and single-step through the user program. It can also be used to program the target PIC microcontroller.

ICD-U40

The ICD-U40 is an in-circuit debugger (see Figure 5.18) manufactured by Custom Computer Services Inc. to debug programs developed with their CCS C compiler. The device operates with a 40MHz clock frequency, is connected to a PC via the USB interface, and is powered from the USB port. The company also manufactures a serial-port version of this debugger called ICD-S40, which is powered from the target test system.


Figure 5.18: ICD-U40 in-circuit debugger

PICFlash 2

The PICFlash 2 in-circuit debugger (see Figure 5.19) is manufactured by mikroElektronika and can be used to debug programs developed in mikroBasic, mikroC, or mikroPascal languages. The device is connected to a PC through its USB interface. Power is drawn from the USB port so the debugger requires no external power supply. The PICFlash 2 is included in the BIGPIC4 development kit. Details on the use of this in-circuit debugger are discussed later in this chapter.


Figure 5.19: PICFlash 2 in-circuit debugger

Оглавление книги


Генерация: 1.330. Запросов К БД/Cache: 3 / 0
поделиться
Вверх Вниз