Page 60 - Amphibionics : Build Your Own Biologically Inspired Robot
P. 60
Amphibionics 03 3/24/03 8:11 AM Page 39
Chapter 3 / Microcontrollers and PIC Programming
other than the F84, just use the -P command line option, described
later in the manual, to specify a different target processor. For
example, if you intend to run the above program, frog-test.bas, on
a PIC 16C74, compile it using the command:
PBP -p16c74 frog-test.bas
An assembler source code file for frog-test.bas is also generated.
It is called frog-test.asm. The assembler source code can be used
as a guide if you want to explore assembly language program-
ming because the listing shows the PicBasic Pro statement and
the corresponding assembly code on the next line. The rest of the
chapters discussing software will not be addressing assembly
code. All we really need to be concerned with is the PicBasic
source code and the generated .HEX machine code, as listed in
Program 3.2.
If you do not have the resources to buy the PicBasic Pro compiler,
simply type the listings of the .HEX files into a text editor and save
the file with the program name and .HEX extension. All the pro-
gram listings in the book can also be downloaded from
www.thinkbotics.com to make things easier. However, I recom-
mend buying a copy of the compiler if you wish to experiment,
change, or customize the programs. If you decide to continue with
robotics and electronics, you will eventually need to buy a com-
piler, such as PicBasic Pro, when working with microcontrollers.
:100000007B28A0003B200C080D04031976287020E3 PROGRAM 3.2
:1000100084132008800664000D280E288C0A03191A frog-test.hex program
:100020008D0F0B28800676288F0022088400200977 listing
:100030003C2084138F0803197628F03091000E08B5
:1000400080389000F03091030319910003198F0359
:10005000031976282B283F2003010C1820088E1F37
:1000600020088E0803190301900F382880061F28E6s
:10007000392800002228FF3A8417800576280D08C9
39