Purpose: Using the embedded controller to produce a programmed output (LED indication).
Objective: This workshop is designed to familiarize the student with elements of the embedded microcontroller.
Real world application: Controlling a traffic light.
2. PBasic Software Commands:
Procedure: Set the LEDs vertically on the photoboard:
Red on top
Yellow below red
Green below yellow
Step 1 - Light the red LED for 9 seconds.
Step 2 - Turn off red LED, then light the green LED for 7 seconds.
Step 3 - Turn off the green led, then light the yellow LED for 3 seconds
Repeat steps 1 through 3 forever.
Circuit Drawing for Workshop #1
PicBasic Code for Workshop #1
high 1 'red LED
high 3 'green LED
high 2 'yellow LED