28123 Parallax Inc, 28123 Datasheet - Page 60

TEXT WHAT'S A MICROCONTROLLER

28123

Manufacturer Part Number
28123
Description
TEXT WHAT'S A MICROCONTROLLER
Manufacturer
Parallax Inc
Type
Programmingr
Datasheet

Specifications of 28123

Style
Book
Title
What's a Microcontroller?
Contents
Whats a Microcontroller? Text
Product
Microcontroller Accessories
Core Processor
PIC16C57c
Flash
128 Bytes
Operating Supply Voltage
9 V
Board Size
31 mm x 16 mm
Lead Free Status / RoHS Status
Not applicable / Not applicable
otherwise need a
programs in this book even if your computer failed the diagnostic test.
Your Turn – Timing and Repetitions
By changing the
time the LED stays on and off. For example, by changing both the
to 250, it will cause the LED to flash on and off twice per second. The
program will now look like this:
If you want to make the LED blink on and off once every three seconds, with the low
time twice as long as the high time, you can program the
14
the
A fun experiment is to see how short you can make the pauses and still see that the LED
is flashing. When the LED is flashing very fast, but it looks like it’s just on, it’s called
command so that it takes one second using
LOW 14
DO
LOOP
DO
LOOP
Open LedOnOff.bs2
Change the
run the program.
Modify and re-run the program using the code snippet above.
HIGH 14
PAUSE 250
LOW 14
PAUSE 250
HIGH 14
PAUSE 1000
LOW 14
PAUSE 2000
command will have to be
PAUSE
DEBUG
PAUSE
command’s
instruction. So, you should be able to run all of the remaining
command’s
Duration
PAUSE 2000
Duration
PAUSE 1000
argument you can change the amount of
.
arguments from 500 to 250, and re-
PAUSE
. The
command after the
PAUSE
Duration
DO…LOOP
command after
arguments
in your
HIGH

Related parts for 28123