Documente Academic
Documente Profesional
Documente Cultură
Ê
'()*+,Ê
The color Inchworm+ Assembly Manual including schematic.Ê
-
. ,
%
c
Ê
Ê hpgradeable to the very fast hSB version with the hnicorn KitÊ
Ê Switch / jumper controlled target power (switch optional, jumpers standard)Ê
Ê Switch / jumper controlled ·PP (switch optional, jumpers standard)Ê
Ê Software (MPLAB) controlled target power (optional BS2þ0 PFET)Ê
Microchips MPLAB IDE 7.60 current version as of this writing, is the tool that professional
PIC programmers use. You can download it free fromhttp://www.microchip.com it includes
everything you'll need to use your Inchworm ICD2.Ê
rDebugging makes programming and learning PICs very easy as you can stop, examine and
modify your code and/or symbols & variables at will.Ê
ICD2 bootloader firmware for a 16F877A Inchworm 16F877A Firmware supports both
Inchworm+ & InchwormÊ
Inchworm+ mounted on the Unicorn USB Experimenter (many times faster than the RS232 based Inchworm+).Ê
ÊÊ
.cc* .Ê
&"c
-
Ê
./
-, 0, 12&& &1Ê
I've created a quick start poster to get you started with your first PIC program. Schematics
and source code for the Firefly 16F88 and a handful of popular PICs. Also a quick intro to
Microchips MPLAB IDEÊ
-
. ,
%
Microchips MPLAB IDE 7.þ0 as of this writing is the tool that professional PIC programmers
use. You can download it free from http://www.microchip.com it includes everything you'll
need to use your Inchworm ICD2.Ê
rDebugging makes programming and learning PICs very easy as you can stop, examine and
modify your code and/or symbols & variables at will.Ê
%,3Ê
On a side-note I've integrated MeLabs PICBASIC into MPLAB. Integrating it was easy, just
follow the MPLAB instructions on MeLabs site.Ê
The difficult part was setting the __config directive. It's poorly documented (I couldn't find
it) on the MeLabs site. So to save you the trouble here's what I found out.Ê
After that it worked like a charm. Just "Compile" (F10) and "Release from Reset" to run
your project. Takes about 10 seconds.Ê
Ê
! !
Ê
K %,7 "Ê
,-
&, %
8
. %% Ê
9:65:4 8 $
Ê
Ê
Kunebug is a combination USB PICKit2 SE* PIC development tool and Enhanced 18F TutorÊ
K % '(;Ê
Here's the Junebug Assembly Manual be sure to check for new update, currently April 20,
2008Ê
Ê hSB based PICKit2 compatible PIC Programmer / debugger for many 16F &
18F PICsÊ
Ê Supports both MPLAB IDE 8.x and standalone PICKit2 softwareÊ
Ê Onboard tutor support for either 16F88 or 18F1320Ê
Ê hSB powered programmer & tutor, can supply up to 100ma @ þ·DC to your
target projectÊ
Ê 3.3· support is possible by adding a pair of clamp diodes to the PüC & PüD
pinsÊ
r the SE (Student Edition) does not have a programmable 2.þ· - þ· ·DD or the internal
EEPROMs found on the genuine Microchip PICkit2.Ê
+
5
&"7% %*
%
,:65$$
R R
Ê
ÊÊ
3Ê
Swordfish BASIC is an excellent Structured Modular BASIC compiler for the 18Fxxx series of
PIC microcontrollers. The developers have a free Student Edition, download it from
the Swordfish website. It has a very generous limit of 2þ6 bytes of RAM but no limit on the
ROM size.Ê
It's a powerful full featured language, if you have a Junebug or Mongoose we've got a
couple of modules for it, copy the modules into Swordfish Library directory.Ê
JhNEBhü.BAS the Junebug module 0. 3beta supports the LEDs and pushbuttons.Ê
MONüOOSE.BAS the Mongoose module also in beta, easy PM Motor control.Ê
Here's a simple Swordfish BASIC SE program that flashes Junebugs LEDs in sequence.Ê
]]
^ = 18F1320
u = 4 ]]
M M
^
OS ON = $62 ]]
! ON1 = %11110101 ]] ] !
" !
#
= 0 6
LE
]] $ %&'() %&'*)
^ 300 ]] + *** ,
]] ,-
Ê
Y
h
w LE #1
M1310
LE 6
T = TMR0L = 7!*
T =
T
STMR0H*256T*166
WM Y
w 0MTM S
M1310
LE 4
NT ON4 = 0
OS ON = $2 ]] 8
Sº600
NT ON2 = 0 = 1 00
NT ON1 = 0 = 7*9
NT ON4 = 1 = 7*%
NT ON26 =0 = 7%&:* ,
! ON1 = %11110101
WMWh LE 1 h
#1M1310
Q = 0
T0 ON = $04 = ]#/ *. ( 2
TMR0L = 0 = $
TMR0H = 0
LE 3 = !+
^ 1000
NT ON1 = 0 = $ 0 ,
º
LE 2 = +
^ 500
Q = 1 = = ;0,+ +0, 2+
+
T0 ON = 1 = $
LE 1 = :
^ 1000 = 0
NT ON4 = 0 = 1 2 0
LE 5
WM T
S
w RESET
M1310
Ê
ÊÊ
%-
9
&&Ê
ÊÊ
Ê
Here's the Swordfish BASIC Mongoose module (beta 0. ) it works great but I'd like to add
the tachometer module too. Currently the modules sole subroutine is
!which will drive the Left and Right motors. ë R
Ê
M
M
LR6412 ]] , ,1 ( '<*=). !$ - >/? '**=)
ORT 0 ]] 0 $ $$ %&
^ 5000 ]] + <
ORT 0 ]] 0 ,, $ $$ %&
M
LR00 ]]
^ 1000 ]] +
]]
Ê
The first production run of the Mongoose kits are ready, the black anodized frame halves
look and fit great. I've posted a couple of photos to show the front and underside view of
the first assembled kit R . I've been working on some demo code in both
assembler and SwordfishSE BASIC I'll be posting it here ASAP. Note: Mongoose does not
get its power from the ICD2 but relies on the NiMH batteries for both motor & CPh power.
Do not use an unregulated power supply in place of the 4xAA batteries as this will damage
the PIC.
A þ· 2A
switch
mode
regulate
d
adapter
will work
fine. The
ferrite
bead at
J1 can
be
replaced
by a
simple
wire link
if
desired.Ê
The
SN7þ441
0 runs
only
warm so
the heat
sink in
the drawings is not necessary. All that we're waiting for is the new chassis metalwork and
anodizing to be done.Ê
The manual is currently a work in progress but I won't make you wait if you can't wait to
get your hands on the kit ASAP. The manual will be updated and available free online with
the first release having the BOM, schematic and a few diagrams like the one on the left to
get you started. hen building the PCB you'll have to pay attention to the build order and
the part location as parts mount on both sides of the board.Ê
The Mongoose is well balanced and stable, at full speed the wheels turn about 120RPM this
translates to about 0.36 meters per second. Having the rotation sensors as standard
equipment (usually an expensive option on small robot kits) you can slow the Mongoose
down to a crawl and even get an idea on how far its traveled.Ê
The optical interrupter gears (the blue one with the three black stripes) are easy to paint
with a Sharpie fine tip paint marker. If you're skilled enough you can add more stripes to
increase rotation sensing resolution. The interrupter gears turn 27x faster than the wheels,
so two or three stripes represent either 108 or 162 light to dark or dark to light transitions
per wheel rotation. Higher resolution is possible but for ease of assembly we'll be choosing
from either two or three stripes
as the recommend standard.Ê
ÊÊ
ÊÊ
*
*% ? $
Ê
*
,3
>Ê
The *
PCBs are here, they look great but a small opps
crept in while I was editing the silkscreen layer (I bumped Q1
too high and it touches a trace shown in purple!). Luckily it
does not affect normal operation of the hnicorn and the simple solution is to
7 .:
+@ (designed for Experimenter use and has no effect on the hSB Inchworm+ upgrade).Ê
Ê MPLAB compatible
hSB upgrade for the
Inchworm+ (simply
snaps to the bottom
of the Inchworm+)Ê
Ê Many times faster
than the RS232
version of InchwormÊ
Ê hses your hSB port
for power 2þ0ma
maxr to power itself,
Inchworm+ and your
target project.Ê
Ê For extra power use
the Inchworm+
onboard power
supply 1A maxÊ
Ê hses MPLAB
firmware client
driverÊ
ÊÊ
*
*3 $
!!!Ê
r Although hSB can supply up to þ00ma, 100ma is the maximum recommended. There is a
2þ0ma self resetting thermal fuse on hnicorn.Ê
hnicorn Assembly
InstructionsÊ
&
%" Ê
Here's a link to things you can do with a 18F4þþ0 Create hSB InterfaceÊ
To get you started with both LCD & üLCDs I've linked an excellent LCD Info Page by Dincer
Aydin with simulator for both Character and üraphic LCDs
And this is the Inchworm+ mounted directly to the hnicorn, the pair appear in MPLAB as a
MPLAB firmware client. You have to program the 18F4þþ0 with a special18F4þþ0 hSB
client first. 12mm spacers are ideal for mounting when used this way. I've use this
combination for all my project work, and although you can power your projects with hSB
power you should be aware that hSB very limited in the amount of current it can supply.
Typically 200ma before the power will sag (this can cause the debug mode to reset
unexpectedly). Low power requirement kits like Firefly work fine with hSB power but high
current kits like Dragonfly will also require an external DC supply connected to the
Inchworm+. This method uses almost no hSB power and can supply almost 1A to your
target project. hse external power with any loads greater than 100ma.
ë
5
&"AB3
?A5C
+,'))Ê
5
&"B
A5C
+,
'()Ê
5
&"ABA5
-c7DC
+,')Ê
The Firefly Assembly
Instructions Includes
description, schematic, parts
list and more. Now expanded to 16 pages.Ê
Kit #2 Firefly is a PIC 16F88 tutor and a companion project for the Inchworm ICD2 kit.
Firefly can be built as either a PIC ZIF socket adapter or as a PIC tutor with debug support.
For only a few dollars more Firefly TZ than a ZIF socket only adapter like Melabs (or a few
dollars less the Firefly Z (ZIF only).Ê
Firefly's main features: (when built with both ZIF and Tutor options)Ê
5
&"3&
-":E566
%
Ê
Depending on the software you've got programmed on the Fireflys Tutor 16F88 you might
have problems reading PICs when using the ZIF socket. Here's the Sleep.hex program as
described in the Firefly assembly manual. Simply program it onto the 16F88 before using
the ZIF socket.
Ê
5
&"A5-
%
Ê
Ê
Ê
Ê