Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

Inchworm Assembly Instructions

Download as pdf or txt
Download as pdf or txt
You are on page 1of 8

Inchworm ICD2 Assembly Instructions

Introduction
The Inchworm is both a Microchip® PIC™ programmer and debugger. It can program the majority of
FLASH based PICs including the 16F and 18F series microcontrollers. It uses Microchips own
MPLAB™ IDE and had been tested with MPLAB 7.41 latest version as of this writing.
Also included is an extremely useful you’ll wonder how you programmed without it debugger. Although
the debugger mode is not built-in on all 16F series PICs the smaller (less than 18pin) PICs often require a
special ICD version; it is available on all 18F and dsPIC microcontrollers. The debug mode allows you to
set a breakpoint(s) in your program. When the program stops you can view and even modify internal
registers on the PIC.

Unlike many other inexpensive PIC programmers the Inchworm…


• Is both a Debugger and Programmer
• Always supports the latest PICs (MPLAB will update the firmware)
• Can power target (5V @ 500ma) or be target powered
• Uses an inexpensive 2.5mm center positive 9VDC - 12VDC @ 500ma wall adapter

What it can’t do
• VPP voltage is not programmable; it is set to approximately 12.5V
• It works with 5V only targets
• +5V on ICD connector is not switchable
Circuit Description
The Inchworm was designed to be easy to assemble and use. It only contains three ICs as almost all of the
work is done inside the 16F877A that’s the beauty of microcontrollers.
The other ICs include U1 a LM7805 voltage regulator and U3 an RS232 level converter with a built in
switched capacitor voltage doublers.
VPP > 12V is generated from 5V using the MAX232s’ own
internal voltage doublers.
Diode D5 and capacitor C8 act as part of a voltage multiplier
circuit. In a lossless circuit there would be approximately 15V at
the cathode of D5 but because of voltage drops both internally to
the MAX232 and across D5 (approx 0.7V) the voltage is actually
closer to 14V. D6 rectifies and C9 filters the voltage down to
approx 13.5V
Additionally Q3 switches target VPP on or off drops the voltage an
additional 0.7V to the final VPP target voltage of roughly 12.5V
which is excellent for the majority of most PICs.

VPP control is done with transistors Q1 thru Q4. Diodes D3 & D4 prevent reverse current from flowing
into transistors Q1 & Q2. Transistor Q4 and resistors R15 & R13 act as an emitter follower limit the
amount of current allowed to flow through Q3. Also shown is a typical voltage divider (the Inchworm
has a total of three R1/R8, R3/R10 and R16/R17) that connect directly to analog inputs RA0, RA1, RA3
on U2. Lastly DTR controls U2s reset, since RS232 levels are generally greater than the 5V permitted the
pin is clamped using diodes D7 & D8 and current is limited by R18.
The majority of the work is done inside the 16F877A microcontroller (U2). In a nutshell it does all the
accurate timing for VPP levels and serially clocking data (PGC & PGD) into the target PIC.
The +5V power supply is a typical LM7805 design. Diode D2 insures correct polarity from the power
adapter and diode D1 acts as protection for the regulator.

Firmware Notes
Your Inchworm kit includes a preprogrammed 16F877A. You can and should program a spare 16F877A
just in case you damage your original. The 16F877A “ICD2_BOOTLOADER_A.HEX” can be
downloaded from www.blueroomelectronics.com. If you damage the 16F877A you can order another
preprogrammed one from one of the sources on the back cover of this document or you could hand
assemble a 16F877A programmer from one of the many designs you can find searching the web.
Searching the internet for “JDM PIC Programmer” should provide many results.
Note: If your Inchworm has a 16F877-20 you must use different bootloader firmware
“BL010101.HEX” and can be found in the MPLAB ICD2 directory when you install MPLAB.

blueroomelectronics Page 2 of 8
Necessary Tools (not included in kit)
As with any electronic kit the following tools are essential:
• Low wattage fine tip soldering iron <50W
• Resin core solder
• Wire cutters or side cutters (small)
• Needle nose pliers (small)
• Slotted screwdriver (small)
• Phillips screwdriver (small)
• Wire strippers
• Multimeter (this really is a must for any electronics project)

Assembly
Traditionally it’s easiest to assemble a circuit board from smallest to largest part.
Install 1% (blue epoxy) resistors R8, R17, R3, R10, R1, R16
Install remaining 5% resistors (tan epoxy)
Power diodes D1, D2 (Black 1N4001)
Switching diodes D3 thru D8 (Red 1N4148)
Note: diodes use a colored band to denote polarity
IC sockets U2 and U3 (notice notch orientation)
Crystal Y1 and capaitors C10, 13
Transistors Q1, Q4 (BC548B); Q2, Q3 (BC558B)
Note: LEDs use a flat side indicating polarity
LED1 (green / power), LED2 (amber / busy)
Capacitors C1, C3, C4, C5 (note lead spacing)
Connectors CON1, CON2 (note the notch)
2.5mm coax power jack P1
U1 and heatsink (test fit before soldering)
Capacitors (note polarity) C2,C9 (47uF) then C6,C7,C8,C9,C12 (10uF)
Optionally you can install a small wire loop at TP GND for testing

Initial Testing
Before installing ICs U2 and U3 apply power to the board using a typical wall AC adapter rated between
9 – 15 VDC @ 700ma to 1500ma. The green POWER LED (pictured above) should glow. If you have a
multimeter test for +5V using TP +5 and >+12V using TP VPP
(Note: TP VPP should not be above 15V).

Final Assembly
Remove power before inserting U3 (MAX232) and U2 (PIC16F877A). It is very important to insert the
ICs carefully (don’t bend the pins) and in the proper orientation (notice the notch on the IC). ICs inserted
in the wrong direction when power is applied will usually damage the IC. If you’re unsure look at the
main illustration on page one of this document. You’re now ready to apply power. If the POWER LED
does not light immediately unplug the power and recheck all ICs are properly inserted.

Optional: The Inchworm can be mounted in a Hammond 1591B case bottom half, this will protect both
the bottom of the PCB and your desk from damage.
Note: you must file or trim the top lip of the 1591B case directly under the DE9 serial connector approx
0.1” (2.5mm) to insure a proper fit.

blueroomelectronics Page 3 of 8
Parts List INCHWORM

Capacitors
1 C1 0.33uF 25V
2 C2,9 47uF 25V
3 C3,4,5 0.1uF
5 C6,7,8,11,12 10uF 16V
2 C10,13 33pF

Resistors 1/4W 5% Carbon (tan body, 4 color bands)


5 R2,4,7,9,14 330 Orange, Orange, Brown, Gold
1 R18 1K Brown, Black, Red, Gold
2 R5,6 4.7K Yellow, Green, Red, Gold
2 R11,12 22K Red, Red, Orange, Gold
1 R13 47K Yellow, Green, Orange, Gold
1 R15 100K Brown, Black, Yellow, Gold

Resistors 1/4W 1% Metal Film (blue body, 5 color bands)


2 R8,17 2.2K 1% Orange, Orange, Black, Brown, Brown
2 R3,10 4.7K 1% Yellow, Green, Black, Brown, Brown
2 R1,16 6.8K 1% Blue, Grey, Black, Brown, Brown

Semiconductors
2 D1,2 1N4001 Diode
6 D3,4,5,6,7,8 1N4148 Diode
1 LED1 (POWER) 3mm GREEN LED
1 LED2 (BUSY) 3mm AMBER LED
2 Q1,4 BC548B NPN
2 Q2,3 BC558B PNP
1 U1 LM7805 TO-220
1 U2 PIC16F877A (ICD2_BOOTLOADER_A.HEX)
1 U3 MAX232 or equivalent

Crystals
1 Y1 20MHz Crystal

Connectors
1 CON1 ICD 2x5 PCB Male
1 CON2 DE9 RA Female
1 P1 2.5mm Coax Jack

Miscellaneous
1 40-pin IC Socket
1 16-pin IC Socket
1 Heatsink TO-220 style
1ea Screw, Nut & Lockwasher (for LM7805 and heatsink)

Optional
1 Enclosure Hammond 1591B (112mm x 62mm)
1 9-15VDC Adapter 9-15VDC 2.5mm coax AC adapter @ 750ma
1 5-pin Berg connector
8” 10-conductor ribbon cable
1 10-pin IDE female crimp connector

blueroomelectronics Page 4 of 8
blueroomelectronics Page 5 of 8
Building the ICD Cable
There are many types of ICD cables, this first one is a tradional cable.

Traditional

New “i” type (designed for blueroomelectronics projects)

blueroomelectronics Page 6 of 8
A Brief Introduction to MPLAB® IDE
Before you begin you will need to download and
install Microchips MPLAB IDE from
www.microchip.com
MPLAB IDE is a very powerful tool a few notable
features are:
• Macro Assembler and Simulator
• Programmer and Powerful Debugger
• Third party complier integration

Tutorials and full documentation (beyond the scope


of this document) can be found on the Microchip
web site.

Connecting Your Inchworm


The Inchworm connects to your Windows™ based computer through an RS232 port. If your computer
does not have a RS232 serial port (a laptop computer for example) you will need a USB to RS232
adapter. These are common devices and can be purchased at most computer retailers.
Notes:
• You can only use COM1 or COM2 this may change, read the MPLAB readme
• You must disable the (COM1 or COM2) FIFO buffer from Windows™
• Choose Select Programmer and choose 2 MPLAB ICD 2
• Select Settings… and select your Com Port (either COM1 or COM2)
o If you get communication errors try changing the Baud Rate to 19200
• You may have to Download ICD2 Operation System.
o This feature can be set to automatic.

Supported PICs Device Support List with MPLAB IDE version 7.40
Debugger & Programmer Support

All dsPIC30Fxxxx and 18Fxxxx series PICs

PIC16F737 PIC16F747 PIC16F767 PIC16F777 PIC16F818 PIC16F819


PIC16F87 PIC16F88 PIC16F870 PIC16F871 PIC16F872 PIC16F873
PIC16F873A PIC16F874 PIC16F874A PIC16F876 PIC16F876A PIC16F877
PIC16F877A PIC16F913 PIC16F914 PIC16F916 PIC16F917 PIC16HV785
PIC16F946

The following PICs require a special -ICD debug version with header
Note: These special ICD PICs do not lose any I/O when used with the ICD; they also include a small PCB with ICD2
(Microchip) RJ-6 header.

PIC10F2xx PIC12F5xx PIC12F6xx PIC16F627A PIC16F628A PIC16F648A


PIC16F684 PIC16F687 PIC16F688 PIC16F689 PIC16F690 PIC16F716
PIC16F785 PIC16F505 PIC16F630 PIC16F636 PIC16F639 PIC16F676

PICs with Programmer Support Only


Note: These tend to be older PICs, they all have modern replacements.

PIC16F72 PIC16F73 PIC16F74 PIC16F76 PIC16F77 PIC16F84


PIC16F84A PIC16F505 PIC16F54 PIC16F57 PIC16F59 PIC16F627
PIC16F628

blueroomelectronics Page 7 of 8
The Inchworm and other blueroomelectronics projects are available at.

Retail Sales

255 College St. Toronto


Ontario, Canada
Tel (416) 977-9258
Fax (416) 977-4700
creatronpart@hotmail.com
www.creatroninc.com

Direct Sales

blueroomelectronics
4550 Dufferin St. Toronto
Ontario, Canada
Tel (416) 897-1962
sales@blueroomelectronic.com
www.blueroomelectronics.com

Info and all other inquiries info@blueroomelectronics.com

blueroomelectronics Page 8 of 8

You might also like