Inchworm Assembly Instructions
Inchworm Assembly Instructions
Inchworm 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.
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
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
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
Supported PICs Device Support List with MPLAB IDE version 7.40
Debugger & Programmer Support
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.
blueroomelectronics Page 7 of 8
The Inchworm and other blueroomelectronics projects are available at.
Retail Sales
Direct Sales
blueroomelectronics
4550 Dufferin St. Toronto
Ontario, Canada
Tel (416) 897-1962
sales@blueroomelectronic.com
www.blueroomelectronics.com
blueroomelectronics Page 8 of 8