28123 Parallax Inc, 28123 Datasheet - Page 182

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
'{$STAMP BS2}
'{$PBASIC 2.5}
pinCounter
DEBUG "I/O Pin", CR,
FOR pinCounter = 8 TO 15
NEXT
Your Turn – A Different Pattern
Removing the command
ACTIVITY #3: DISPLAYING DIGITS
If you include the decimal point there are eight different BASIC Stamp I/O pins that send
high/low signals to the 7-segment LED display. That’s eight different
commands just to display one number. If you want to count from zero to nine, that would
be a huge amount of programming. Fortunately, there are special variables you can use
to set the high and low values for groups of I/O pins.
In this activity, you will use 8-digit binary numbers instead of
to control the high/low signals sent by BASIC Stamp I/O pins. By setting special
variables called
the high/low signals sent by all the I/O pins connected to the 7-segment LED display
circuit with a single PBASIC command.
DEBUG DEC2 pinCounter, CR
HIGH pinCounter
PAUSE 1000
LOW pinCounter
"-------", CR
Comment the
of it.
Run the modified program and observe the effect.
DIRH
VAR
and
LOW pinCounter
LOW pinCounter
Nib
OUTH
equal to the binary numbers, you will be able to control
will have an interesting effect:
command by adding an apostrophe to the left
HIGH
and
LOW
HIGH
commands
or
LOW

Related parts for 28123