The PIC Source Book
A collection of ready-to-use assembly language routines based on the instruction set of the BASIC Stamp ® single-board computer.

by Scott Edwards, 1994


Foreword to Online Edition

The PIC Source Book was written in 1993 to provide users of the Parallax PIC programming tools with a ready-made collection of assembly code in Parallax assembly mnemonics. At the time, there were four PICs: 16C54, 55, 56, and 57. The popular '84 and ADC-equipped '71 were brand new. Since then, Microchip has made dozens of architectural enhancements to the PICs, and made its assembler available free via the net and CD-ROM. This has diminished interest in both the 5x PICs and the Parallax assembler.

As a result of these changes, the Source Book is reaching the end of its commercial life. Rather than discontinue it, the author has decided to make it available free via the Internet.

[ed: these routines are being converted to MicroChip assembler format again by James Newton of piclist.com using the latest version of Tony Nixons ParaPic]

Free means free. You may use this material in any way you wish without obligation to the author. The author bears no liability for the consequences of such use, and will not support users of this free edition in any way. He will not be obliged to answer questions or respond to comments. Any of you who have been besieged with e-mail during Senior Project season will appreciate the wisdom of getting this out in the open right up front!

 The book lists some utilities and extras on "the accompanying disk." Unfortunately, people other than the author hold the rights to these items, so they cannot be included with this online freebie.

PIC is a registered trademark of Microchip Technologies Inc.; BASIC Stamp is a registered trademark of Parallax Inc.

Useful Links

Scott Edwards Electronics, Inc.
Company founded by the author; makers of serial LCD products.
Parallax, Inc.
Makers of tools for programming PIC and SX microcontrollers.
Microchip Technology Inc.
Manufacturers of PIC microcontrollers.


On the public release of the Scott Edwards PIC Source Book Disk, all executable files have been removed, and there is no Technical support whatsoever with the on line version.

Table of Contents

Introduction
Branch
Button
Debug
EEPROM
End
For...Next
Gosub/Return
Goto
High
If...Then
Input
Let x=x+y
Let x=x-y
Let x=y/z (division)
Let x=y//z (remainder)
Let x=y*z
Lookdown
Lookup
Low
Nap
Output
Pause
Pot
Pulsin
Pulsout
Pwm
Random
Read
Reverse
Serin (receive data)
Serin (convert # data)
Serin (check qualifiers)
Serout (send data)
Serout (format # data)
Sleep
Sound
Toggle
Write
Parallax Instructions