RFSOLUTIONS ISPICR1

PIC IN CIRCUIT SERIAL PROGRAM ADAPTOR
•
•
•
•
•
ISPICR1
In Circuit Programming of PIC Micros
Picoflex
Connector
Direct Connection from Any PIC Programmer
DIP
Easy programming of any Package!
Connects directly to Programmer ZIF Socket
Connects directly to Target Board
Adaptor
Plugs into
Programmer ZIF
Socket
Plugs into Target PCB
Adjacent to PIC
Description
The ISPIC Adaptor enables the In Circuit programming of PIC Microcontrollers. In circuit programming
can be applied to any serially programmable part including One Time Programmable (OTP) and Flash
devices.
It consists of an adaptor which plugs into the ZIF socket of the users existing programmer (e.g.
PICSTART+, MEL EPICA etc), and connecting cable which connects to the target board (adjacent to the
PIC Micro to be programmed).
The ISPIC adaptor is shipped with a low cost Molex Picoflex flying socket (on the end of the cable). A
mating Picoflex PCB mounting plug (also supplied) is mounted on the target PCB. This provides easy
connection for the programming cable. Alternatively any custom connection can be used
Programming of a device using the ICSP technique is achieved by powering up the device and then
holding RB6 and RB7 low while raising the MCLR/Vpp pin to +13 volts. This places the PIC in
programming mode and a clock signal on RB6 is then used to clock data into, and out of RB7.
Operation
The user simply connects one end of the ISP to the standard PIC Programmer ZIF socket and the other
end to the target board containing the target PIC.
The PIC is simply programmed in the same way as programming a device mounted in the ZIF socket.
Programming Device List (Correct at Jan ‘2002)
PIC devices which can be programmed using this adaptor include the following;
12C508A, 12C509A, 12CE518, 12CE519, 12C671, 12C672, 12CE673, 12CE674.
14000.
16C505
16C554, 16C558, 16C6XX, 16C7XX.
16FXXX
Note that 16C5x parts cannot be serially programmed.
Configuration of ISPIC/ Programming Selector
In order to serially program a PIC Micro the following connections are required from the programmer to the
target PIC.
MCLR
Vdd
Data
Target PIC Micro
Clock
Vcc
Picoflex
Connector
Target Board Connections
DS021-4 May ‘04
©2004 Reg. No. 227 4001, ENGLAND
Page 1
PIC IN CIRCUIT SERIAL PROGRAM ADAPTOR
ICSP
pin
4
5/6
1
Signal
Function
Vdd
Vss
Vpp
+ve supply to target PIC.
ground reference.
connection to the MCLR/Vpp pin on target PIC.
clock connection to RB6 on the target PIC. (GP1
in 12C parts)
data connection to RB7 on the target PIC. (GP0 in
12C parts)
3
CLK
2
DATA
8pin
1
8
4
ISPICR1
PIC Connections
18pin
28/40
14
20/11,32
5
8,19/12,31
4
1/1
6
12
27/39
7
13
28/40
PCB Layout Requirements
The following drawing shows the PCB layout required to accept the Picoflex connector
The PCB mounting plug is commonly available from most suppliers, part numbers are as follows
Molex :90325-0006,
Farnell: 673-225,
RS: 324-8110
9.95 (.392)
B=6.35 (.250)
Overall PCB area: 5.00 (.197) x 11.40 (.449)
B
1.80 (.071)
1.27 (.050)
φ 1.5(0.059)
Pin 1
Pin 2
1.48 (.059)
2.54 (.100)
PCB Solder Side
Pin 6
φ 0.8(0.031)
How the ICSP Works
Programming of a device using the ICSP technique is achieved by powering up the device and then
holding RB6 and RB7 low while raising the MCLR/Vpp pin to +13 volts. This places the PIC in
programming mode and a clock signal on RB7 is then used to clock data into, and out of RB6.
Limitations
Programming any device in circuit requires a direct connection between programmer and target PIC
Micro.
Note that there are limitations in using any ICSP – which are mainly related to target circuitry and users
should read this document completely before attempting to use the adaptor. In addition, it is recommended
that users confirm all details of device pin-out, target circuitry and programming specifications with the
Microchip In-Circuit Programming Guide - DS30277. This guide can be downloaded from the Microchip
web site at www.microchip.com
Care should be observed when programming any device in circuit. Other components can drain away the
programming signals and cause program fail. The programming adaptor should be viewed as an
extension to the ZIF socket which has been designed to program an I/C without any external circuitry.
This is the reason why the length of ISPIC cable is 15cm (not longer).
The ICSP connection does not take account of any other connections which may be made to the PIC pins
on the target circuit board. For example, in some cases, RB6 and RB7 pins may be used to drive say
LED's or to sense switch inputs and often the MCLR/Vpp pin may be directly connected to the +ve supply
DS021-4 May ‘04
©2004 Reg. No. 227 4001, ENGLAND
Page 2
PIC IN CIRCUIT SERIAL PROGRAM ADAPTOR
ISPICR1
(when the internal reset generator is used). All connections to Vdd, RB6, RB7 and MCLR/Vpp pins must
be examined with care before ICSP is attempted. Specifically the following precautions must be taken:-
DS021-4 May ‘04
©2004 Reg. No. 227 4001, ENGLAND
Page 3
PIC IN CIRCUIT SERIAL PROGRAM ADAPTOR
ISPICR1
Vdd (+ve supply): if the target PIC operates at other than +5 volts then this pin and the MCLR/Vpp, RB6
and RB7 programming pins must be totally isolated from the target during programming.
If the target operates at +5 volts and a PICSTART+ programmer is used then the target PIC may be left
connected to the target circuitry. If however the target loads the 5 volt ICSP supply by more than a few mA
then it will not be possible to perform ICSP. In such cases programming may be possible by powering the
target from its normal +5 volt supply during programming but this is not recommended.
If the target operates at +5 volts and a programmer is used which checks for correct programming at other
than 5 volts (a PROMATE for instance) then this pin and the MCLR/Vpp, RB6 and RB7 programming pins
must be totally isolated from the target during programming.
RB6, RB7: the loading of these pins by the application circuit must be zero or low. Ideally the pins should
be open circuit and often this can be accomplished by using the pins as switch inputs with internal pullups. (assuming normally open switches)
MCLR/Vpp: this pin is pulled to +13 volts during programming and must be isolated from the rest of the
circuit during programming.
Where the pin is simply pulled high to Vdd, a simple solution is to use a resistor of say 47K between the
pin and the Vdd rail. This will clamp the reset line during normal running but allow the ICSP signal to pull
the pin to the programming voltage and without damaging other circuitry on the target board. A better
solution is to use a Schottky diode to connect the pin directly to the Vdd rail with the cathode connected to
MCLR/Vpp pin of the PIC.
Where an external RC reset circuit is employed then it will be necessary to introduce a Schottky diode
between the pin and the RC reset ‘point’. (cathode connected to PIC)
Programmer types and target circuit
When using any ICSP adaptor, selection of the device programmer and the configuration of the target
circuitry is critical if successful programming is to be achieved. At worst, it may be possible to damage
both the target and the programmer if care is not taken. The problem arises from the fact that after
programming is complete, many programmers check the device at voltages other than 5 volts and if the
device is connected in the target to a fixed 5 volt supply then this may cause incorrect measurements to
be taken or in extreme cases, device and programmer damage. In these cases the user must ensure that
the target PIC pins Vdd, Vpp, RB6 and RB7 are completely isolated from the target application during
programming.
Note that the PICSTART Plus development programmer checks for correct programming at +5 volts only
and that in most applications running on a 5 volt supply this limitation does not apply.
Disclaimer
Information given in these instructions is intended for guidance only and no liability is accepted for any
loss or damage which may be caused either by use of the adaptor or by errors or omissions in these
instructions. No representation or warranty is given. Use of R.F.Solutions as critical components in life
support systems is not authorised except with express written approval from R.F.Solutions Ltd.
R. F. Solutions Ltd.,
Lewes, England
Tel +44 (0)1273 898 000
Fax +44 (0)1273 480 661
www.rfsolutions.co.uk
Email [email protected]
R F Solutions is a member of the Low Power Radio Association.
Information contained in this document is believed to be accurate, however no representation or warranty is given and no liability is assumed by R.F. Solutions Ltd. with respect to the accuracy of
such information. Use of R.F.Solutions as critical components in life support systems is not authorised except with express written approval from R.F.Solutions Ltd.
DS021-4 May ‘04
©2004 Reg. No. 227 4001, ENGLAND
Page 4