Example Programs

These are the example programs from the book, you can download the source files (.asm):

A LedOn Turns an LED on
B PushButton (1.0)If a push button is pressed, turns on an LED
C PushButton (2.0)Shorter version of PushButton 1.0
D TimingLED states toggled every second, and buzzer on every five secs.
E TrafficPedestrian traffic lights junction is simulated
F Counter (1.0)Counts signals from a push button, resets after 15.
G Counter (2.0)Stop reading button more than once (otherwise, as Counter 1.0)
H Counter (3.0)Solves button bounce (otherwise, as Counter 2.0)
I StopClockA stop clock displaying tenths of seconds to minutes
J LogicGatesActs as the eight different gates
K AlarmAn alarm system which can be set or disabled
L BikeBuddyA speedometer and mileometer for bikes.
M PIC DiceA pair of dice are simulated
N QuizIndicates which of three push buttons has been pressed first
O PhonecardActs like a phonecard which decrements a file register
P TempSenseDisplays whether temperature is too hot, too cold or o.k.
Q Garden LightsAutomatically controls garden lights

For example programs from the 2nd edition of the book (which generally use non-Flash PIC models), click here.

Copyright ©2006 Perfect Square Ltd.