28123 Parallax Inc, 28123 Datasheet - Page 256

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
LOOP
How SelectCaseWithValues.bs2 Works
A word variable is declared to hold the values entered into the Debug Terminal.
The
The
The first case is if the
numbers, the
The second case is if
those numbers, the
When all the cases are done, the
SELECT..CASE
ENDSELECT
DEBUG CR, "Enter another value: "
CASE 16 TO 255
CASE 256 TO 65535
DEBUGIN
SELECT
PAUSE 200
DEBUG "Byte", CR
PAUSE 300
DEBUG "Word", CR
PAUSE 400
value VAR Word
DEBUGIN DEC value
SELECT value
ENDSELECT
statement chooses the
DEBUG
CASE 0, 1
CASE 2 to 15
command takes the number you enter and places it into the
statement.
DEBUG "BIT", CR
PAUSE 100
DEBUG "NIB (Nibble)", CR
PAUSE 200
DEBUG
and
value
value
PAUSE
and
variable equals either 0 or 1. If
equals any number from 2 to 15. If it does equal any of
PAUSE
commands that follow it are executed.
value
commands below it are executed.
ENDSELECT
variable as the one to evaluate cases for.
keyword is used to complete the
value
equals either of those
value
variable.

Related parts for 28123