Download - ICP Programmer
HandsOn Technology http://www.handsontec.com
1
ISP to ICP Programming Bridge: HT-ICP200In-Circuit-Programming (ICP) for P89LPC900 Series of 8051 Flash μController…
…ICP uses a serial shift protocol that requires 5 pins to program: PCL, PDA, Reset, VDD and VSS. ICP is different from ISP (In System Programming) because it is done completely by the microcontroller’s hardware and does not require a bootloader…
That the 80C51-based controllers are extremely popular is nothing new, certainly when considering the large number of designs that can be found on the web. The reason may well be the fact that the tools (both hardware and software)that are available for this controller are very affordable and there is an enormous amount of information readily available. In addition, a very active forum provides answers to many questions. One of the most significant features of the P89LPC900 Family is that the core now requires only 2-clock Cycles Per Instruction (CPI).8051 experts will already know that this used to be 12 or 6 cycles until now. In practice, this means that the crystal frequency can be drastically lowered to achieve the same processing speed as their classic counter parts.
ISP Programming is only available for 20, 28 and 44pin parts. IAP is only available once your IAP program has been loaded in to the LPC900 part. ICP -can be used to program all the LPC900 parts.
The LPC90x devices can only be programmed using a ICP programming method. In contrast to some of the larger LPC900 family members, the LPC90x devices do not offer other programming methods like Parallel Programming, In-System Programming (ISP) or complete In-Application Programming (IAP). HOWEVER - ICP requires hardware control/ signaling of the LPC900 to be programmed.In some high-end applications, there may be a need to replace the code in the microcontroller without replacing the IC itself. This article described in detail the operation of the In-Circuit-Programming (ICP) capability which allows these microcontrollers to be programmed while mounted in the end product.
P89LPC9xx parts (affectionately know as the LPC900 series of micro-controllers) can be programmed 4 ways...
1. ISP (In-System-Programmed) using the UART of the LPC900.2. IAP (In-Application-Programmed) .. or "self programmed" by reprogramming the flash under code execution.3. ICP (In-Circuit-Programming)... using "Synchronous Serial".... Similar to SPI signaling - each data bit is clocked
in/out under clock signal control.4. Parallel Programmer, available in expensive industry grade tools.
1. INTRODUCTION
HT-ICP200P89LPC900 Target Application Board
To communicate between a PC (running Flash Magic) and the LPC900 Micro-Controller to be programmed an "ICP Bridge" circuit is required as shown in Figure 1.
Figure 1: Hooking up ICP to the P89LPC900 Application Board
HandsOn Technology http://www.handsontec.com
2
ICP Set-up
Figure 3 shows how an ICP programming device can be hooked up to the Application board. This allows the microcontroller to be (re)programmed while it is already soldered on the board.
The programming commands are sent by the programmer through the PCL and PDA lines. Each programming command is one byte shifted into the part by 8 clocks. The serial interface is identical to the 51’s 8-bit serial UART mode 0; LSB is the first bit in the serial byte. The PCL pin is the clock input from the programmer. The PDA pin is the data I/O. The Data is enabled on the falling edge of PCL, and is clocked on the rising edge of PCL. Data output from the part is disabled after the rising edge of PCL for the last bit in a data byte. To get in programming mode the RESET pin has to have a sequence of 7 pulses after the rising edge of VDD. The timing requirements have to be met to get into programming mode, otherwise the P89LPC9xx will run in normal user mode. See Figure 2 for timings detail.
2. PROGRAMMING MODE
Figure 2: Getting into the programming mode
HandsOn Technology http://www.handsontec.com
3
The majority of the LPC900 family have the 5 pins necessary for ICP located in the same configuration. Only the LPC901/902/903 differ from the same configuration. Figure 5 shown some of P89LPC900 devices that support ICP.
The ICP function uses five pins as shown in Table 1. Only a small connector needs to be available to interface your application to a commercial programmer in order to use this feature.
Table 1: Programming pins used for ICP
Using ICP on the application board has many advantages:
• The latest software revision can be loaded into the product before shipping.• Field updates can be made when reprogramming the chip on the application board.• In the debug stage of development the chip can stay on the application board while being reprogrammed.
FlashMagic is the preferred software used to perform ISP on the P89LPC900 series of Flash Microcontrollers that support this programming method. To provide the same programming Interface but still do the ICP programming method that the LPC90x devices require, we had developed ISP-to-ICP Bridge Board HT-ICP200 that can translate between ISP and ICP.
3. PROGRAMMING SOFTWARE
89LPC90089LPC900ISP
ICP
ISP Programming Software
FlashMagicISP-to-ICP Bride Board
HT-ICP200
Figure 4: Interfacing of FlashMagic to HT-ICP200 ISP-to-ICP Bridge Board.
HandsOn Technology http://www.handsontec.com
4
Figure 5 : P89LPC900 Devices that are supported with the ICP programming interface
HandsOn Technology http://www.handsontec.com
5
4. HT-ICP200 BOARD LAYOUT
AC/DC 9~12V Adapter SupplyRS232
5V O/P 3.3V O/PP89LPC900 Target Board
HT-ICP200
97531
108642
K6 Header Pin: ICP Signal
Signal Pins Assigment:
• 1&2 : PDA, Serial Data
• 3&4 : PCL, Serial Clock
• 5&6 : Vprg, Programming Voltage
• 7&8 : RTS, Reset
• 9&10: GND, Groumd
HandsOn Technology http://www.handsontec.com
6
5. ADDING USB INTERFACE TO HT-ICP200 BRIDGE BOARD
By adding another USB-to-UART Board HT-MP213 to HT-ICP200, you will have USB connection to program the NXP P89LPC900 series of u-controller.
Figure 5: Hook up of HT-MP210 USB/UART to HT-ICP200 Programmer
HT-ICP200P89LPC900 Target Application BoardHT-MP213
USB
Reference:
1. How to use the LPC900 In-circuit programming (ICP).
2. P89LPC9xx In Circuit Programming (ICP) Specifications.
3. Flash Magic GUI and Command Line Manual
Source:
1. http://www.nxp.com
2. http://www.handsontec.com/emag.php
3. http://www.flashmagictool.com
HT-MP213 HT-ICP200
SPECIFICATIONS:
1. Single Board small form factor with µcontroller based design
2. Accept AC/DC 9~12V power supply from common wall power adapter
3. On-board stabilized 5V & 3.3V (500mA) DC for prototyping supply requirement
4. 10 pins header connector for target board programming interface
5. RS232 interface to PC Programming Software (FlashMagic). Option for USB connectivity with HT-MP213 USB-to-UART adapter board
C2 100n
C3 100n
R2 560
GN
D
R5 1kR4 56
K
R3 1kG
ND
GN
D
GN
D
1 6 2 7 3 8 4 9 5
K2
DB9
C1+
1
C1-
3
C2+
4
C2-
5
T1ou
t14
T2ou
t7
R1in
13
R2in
8R2
out
9R1
out
12T2
in10
T1in
11
V-
6
V+
2
Vcc
16
GN
D15
IC3
MA
X23
2A
TX RX
GN
DG
ND
C5 100n
C610
0n
C4 100n
GN
D
+5V
C710
0n
C810
0nP0.7
/T1/
KBI
713
P0.1
/CIN
2B/K
BI1
20
P0.2
/CIN
2A/K
BI2
19
P0.3
/CIN
1B/K
BI3
18
P0.4
/CIN
1A/K
BI4
17
P0.5
/CM
PREF
/KBI
516
P0.6
/CM
P1/K
BI6
14
P0.0
/KBI
0/CM
P21
P1.7
2P1
.63
RST/
P1.5
4IN
T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