In-Circuit Emulation
An in-circuit emulator (ICE) traditionally allows processor systems to be tested without the microcontroller or microprocessor present. A host computer with a hardware dedicated emulator pod replaces the target processor, with a header connector with the same pin out as the processor connected to its socket on the application board. The emulator then substitutes for the processor operating at full speed with the real hardware, giving complete control
over the target system. In the microcontroller, however, only the ports are accessible on the pins, so internal debug circuitry is needed to feed register status information out to the debugger in real time, or a header is needed to substitute for the MCU and generate the same data.
The Microchip REAL ICE debugger offers the most comprehensive facilities of the range of in-circuit programmer/debuggers, with multiple modes of operation for interactive hardware testing. As well as the standard connections to the target, or substitute header board, high-speed options are available which can also employ the serial and parallel ports to supply additional debug information. PIC 32 devices have special trace outputs to enhance the debugging operation.
For professional development, the PIC REAL ICE provides superior performance and additional debug facilities, while using the same programming and debugging connections in the target device. For programming chips on a commercial scale, the Microchip PM3 and a number of third-party programmers are available. For current product information, visit www.microchip.com.
1. List the functions of pins 1e5 on the six-pin programming connector of the PICkit2 module. (5)
2. A PIC 16F690 is to be used for digital input on all pins of port C, and therefore no port initialization is performed. Why will this not work correctly? (2)
3. Calculate the maximum value and resolution of an A/D conversion if the reference voltage is 1.024 V, the result is right justified and only the contents of ADRESL are used. (4)
4. Explain why testing a program in simulation mode speeds up the development process. (3)
5. Why does the push button on the LPC board not work when the board is attached to the PICkit2 programmer? (3)
6. Compare the Microchip LPC board with the 44-pin demo board and summarize the additional features of the latter.
1. Download the program LPC1.ASM from the support website www.picmicros.org.uk, load it into MPLAB, assemble and test it in MPLAB. Ensure that the output port bit rotates as required. Modify the program so that the delay count is fixed at 0x80, and check the cycle time is about 1 s. Make sure the clock frequency is set to 4 MHz.
2. If you have access to Proteus VSM, download LPC690.DSN and test the program as above with the pot in mid-position. Setup the display as per Figure 7.4. Check that the output speed is controlled by the pot, and ADRESH and PORTB are displayed correctly.
3. Obtain the PICkit2 demo kit with LPC and test the system using the program LPC1. Connect the hardware, load the program into MPLAB, select PICkit2 programmer, download and run. The MCLR buttons should switch the sequence on and off, and the pot should control the speed.
4. Log onto www.microchip.com and research the current range of starter kits (home/ development tools/starter kits).