AWC APP-III User manual

APP-III PIC
Development Kit
© 2003 by AWC
AWC
310 IvyGlen
League City,TX77573
(281) 334-4341
http://www.al-williams.com/awce.htm
V1.1 30 Aug 2003


Tableof Contents
Overview......................................................................................1
IfYouNeed Help.........................................................................1
WhatElseYou'll Need.................................................................1
Features........................................................................................2
Assembly.....................................................................................2
Programming................................................................................3
Internals.......................................................................................5
Resources.....................................................................................6
Figure 1. CircuitDiagram.............................................................7
ConnectionstoJP1.......................................................................8
ConnectiontoICSPHeader..........................................................8


1
Overview
TheAPP-III allowsyoutodevelopPIC code forthepowerful
PIC18F252 microcontroller. ThekitincludesaspecialPIC18F252
(28 pin microprocessor)that operatesat20MHz anda20MHz
crystal. Thekit includesaPC board (theGPMPU28) whichallows
youtoprovidepower to theboard,connectanRS-232 cabletothe
board, andoptionallyplug theboard intoastandard solderless
breadboard. See theenclosed manualfortheGPMPU28 formore
informationabout thisboard (including assemblyinstructions).
If YouNeedHelp
Ifyourequire assistance, pleasefeelfree tocontactus.Thebest
waytogetsupportisviae-mail (stamp@al-williams.com).
However, youmayalsocall between9AM-4PM CentralTimeat
(281) 334-4341.Youcanalsofaxto(281)754-4462. Be sure to
check outour Webpage forupdatesat www.al-
williams.com/awce.
What ElseYou'llNeed
InadditiontotheAPP-IIIkit, you'llalsoneed afewother easyto
obtain items:
•Asolderlessbreadboard
•Anunregulated powersupply(DC between8and13V) ora
5V regulated power supply.
•MPLAB, thefree software fromMicrochip(or another
developmenttoolthat produces8-bithexfiles)
•Aserialcable(a DB9 maletofemale, if youare using a
PC).

2
Features
ThePIC18F252 core oftheAPP-II has5channelsof10-bitA/D,
up to19digitalI/O, andahardware serialportusablebyyour
programs. Thedevice has1.5KbytesofRAM, 256 bytesof
EEPROM, andnearly 16Kofprogramwords(32Kbytesminus
512 bytes). Thisprocessorismuchmore powerfulthan,for
example, theolder PIC16F87xseries. It includesamore
sophisticated interrupt system, anaccessiblestack, hardware
multiply, andmore.
Assembly
Pleaserefer to theenclosed GPMPU28 manualforassembly
instructions. There isonly onemodificationrequired ontheboard.
Place atwopin maleheader in pins3and4oftheICSP connector.
Leavetheother holesofthisconnector empty. Remember, pin 1of
theICSP connectorisclosestto theDB9 –becarefulnottogetthis
connectorbackwards.
Thetwo-pin header youinstallwillallowyoutoselect
programming mode orexecutionmode byplacing (or removing) a
jumper onthesetwo pins. Withthejumper in place,theAPP-III
willallowprogramming (viathedownload software). Whenthe
jumper isnotpresent,theAPP-IIIwillrunyour program.
TheAPP-III isshipped withatestprogramalreadyonboard.
Remove theshortingcap ontheprogramming header andobserve
theonboard LED.Whenyouapply power tothecircuit,theLED
willblink indefinitely. Ifthisdoesn'thappen, disconnectthepower
immediatelyandcheck all connections.
Once thetestissuccessful, connect your PCtotheboard's
connector.Startaterminalprogram(suchasHyperterminal, which
comeswithWindows). Make sure that theportyouwanttouseis
notin use, andthatthecomplimentaryportisalsonotin use(many
PCscan'tuseCOM1andCOM3orCOM2andCOM4atthesame
time).

3
Therestofthisdiscussionwillassumeyouare using
Hyperterminal.WhenyoustartHyperterminalitwillaskyouto
createanew connection. Callit APPIII (oranynameyoulike).
Thepromptwillaskyouto enter aphonenumber andwill showa
boxthatcontainstheID ofyour modem. Youcanalsoselecta
directCOMportin thisbox, andthat'swhatyou'lldo. Pick the
COMPortyouare usingto connecttotheAPP-III.
Next, Hyperterminalwillpromptyouforserialport parameters.
Select19200 baud (19.2kBaud), 8bits, 1stopbitandnoparity.
Mostimportantly,youmustsetthehandshaking orflowcontrolto
none.
Once you'vesetup theconnection,youshouldbe abletosee hex
numbersdisplaying ontheterminal. Thisshowsthatyour RS-232
connectionisworking. Ifyoudon'tsee theoutput(buttheLEDis
stillpulsating) check theMAX232 wiring andthesettingsonthe
terminalprogram(forexample, someprogramsrequire youto use
aconnectcommandtostartcommunications).
Congratulations!Your APP-III isworking. Nowyoucandosome
programming.
Programming
Toassist youfurther in programming,youcandownload afew
sampleHEXfilesfromour Website(www.al-
williams.com/app3.htm). Oneoftheseisthetestprogramthatis
running ontheAPP-III rightnow.Totesttheprogramming feature
oftheAPP-III,replace theshortingcap ontheICSPheader and
press theRESETbutton.TheLEDshouldquitblinking(because
thePIC isin programmode andnot running your program).
You'llneed todownload theapp3 programfromtheAWCweb
site. ThisprogramisaWindowsconsoleprogram(other
downloadersmaybeavailableonthewebsite). The easiestwayto
runitisfromacommandprompt.Ifyouare connected to COM1,

4
here'sthecommandtoprogram1st.HEX(downloaded fromthe
website):
app3 com11st.HEX
Ifyouwantto verifythatthedevicewasprogrammed correctly
youcanissue thiscommand:
app3 -vcom11st.HEX
Torunthenew program, removethejumper cap andpress the
resetbutton.Thisisthebasicstepsyou'llusetoprogramtheAPP-
IIIeachtimeyouwantto runaprogram.
Youcanwriteyour ownprogramsusing anylanguage that
generates8bithexfileslike MPLABfromMicrochip.
Theapp3 programunderstandsseveraloptions:
-v:Verify
-d type: Display(type=all, pgm,id, eeprom, orconfig)
-e: Erase
-b:Blankcheck
-mxxxx:Sets topaddress for-d,-e,and-b
So, forexample, to displaythecontentsoftheeeprom,issue the
command:
app3 -d eepromcom1

5
Todumpthefirst256bytesofprogramstorage (whichstartsat
location0x200) you'dwrite:
app3 -m100 -d pgmcom1
Ifyouwanted toerasethechip(not necessarywhenprogramming)
andalsowanted toverify thatitwasblank,youcanissue thesetwo
commands:
app3 -e com1
app3 -bcom1
Internals
TheAPP-II isactually aPIC18F252 thatoperates at20MHz.You
canfind documentationforthisdevice attheMicrochipWebsite.
However,theAPP-III environment makesprogramming alittle
different. Inparticular:
•Yourprogramstartsatlocation0x200.
•PortBpin 7isnot generallyavailableforyour use.
•PortBpullup resistorsare enabledbrieflyonreset–
however,ifyouwantthemenabled,youmustenablethem
in your ownprogram.
Althoughyoucanusetheserialport in your ownprograms,you
mustbeabletoconfigure thetwoserialport pinsforserialI/O to
program. Therefore, we don'trecommendyouusetheserialport
foranything other thanaserialport.
Thechipwillnotallowyoutochange certain fusesettings(notably
thecodeprotectoptionsandtheclock selection).

6
YoucouldusePortBpin 7asanoutputin your programwith
somemodificationtoyour circuit. Theideaisthat youneed tobe
abletoremovetheconnectionfrompin 7andholdit lowwhile
goinginto resetto enableprogramming mode. Soifyouused an
externalheader,youcoulddisconnectyour externalcircuitryfrom
pin 7andreplace itwithapulldownresistor(around4.7K)to
enter programming mode. After programming,you'dreturnthe
circuittoits originalconfiguration. Be carefulnotto shortpin 7
directlyto groundifyouare usingitasanoutputsince thiscould
damage theAPP-III!
Resources
http://www.al-williams.com/app3.htm –Examplesand include
files.
http://tutor.al-williams.com/pictutor –Illustratedtutorials.
http://www.microchip.com –Download manualsforthePIC and
MPLABforfree.
http://www.piclist.com –InformationandhelpaboutthePIC.

7
Figure 1. Circuit Diagram

8
ConnectionstoJP1
Pin 1ofJP1 isclosestto theJP1 markingontheboard:
JP1pin Signal IC1 Pin
1Ground
2RC2 13
3RC1 12
4RC0 11
5RA57
6RA46
7RA35
8RA24
9RA13
10 RA02
11 5V
ConnectiontoICSP Header
YoucanusetheICSP header to connecttoanin circuit
programmer orin circuitdebugger. Pin 1isthepinclosestto the
DB9 (J1).
Pin Signal IC1 Pin
1MCLR1
25V
3Ground
4RB7 28
5RB6 27
Table of contents
Popular Microcontroller manuals by other brands

Trion
Trion T120 BGA576 user guide

Sparkfun Electronics
Sparkfun Electronics Big Time Information & Instructions

Texas Instruments
Texas Instruments LaunchPad MSP-EXP430FR5994 user guide

CoreTigo
CoreTigo TigoStarter K6 user guide

Nuvoton
Nuvoton NuMicro M252 Series user manual

Texas Instruments
Texas Instruments MSP430F6775 manual