To get started with PIC Micro Pascal, here is a series of seven easy LED projects; the goal is to blink the LEDs in various ways, or to fade them on and off.
As a rule, most of the exercises on this site will each be framed around a single schematic. But for these first seven projects, one schematic covers them all. In some instances you'll only require a single LED, while others may need four or even all eight. Here's the schematic; you can click on it to view it separately and magnify it. Even better is to download the schematic. At the bottom of this page, there's a link from which you can obtain a PDF of it for your notebook.
Apart from learning how to manipulate LEDs, the goal in each of these exercises is to build a working knowledge of PMP and its syntax. There is a definite progression, if you take the time to study the source for each.
Speaking of which, the source code is heavily commented and is fairly well documented. However, as a brief overview, here's what each exercise undertakes:
- 001 -- Blink one LED
- 002 -- Blink all eight LEDs
- 003 -- Chaser light effect on all eight LEDs
- 004 -- Eight-bit binary counter display
- 005 -- Fading an LED with hardware PWM
- 006 -- Fading an LED using the PWM() procedure
- 007 -- Fading four LEDs using homebrew software PWM
So dig in. Though manipulating LEDs might not seem all that glamorous, these exercises are still an important start. You'll learn about PMP project settings, register names, specifying the clock, and a little bit of Pascal in general
Next Project: Charlieplexed LEDs