28123 Parallax Inc, 28123 Datasheet - Page 187
28123
Manufacturer Part Number
28123
Description
TEXT WHAT'S A MICROCONTROLLER
Manufacturer
Parallax Inc
Type
Programmingr
Datasheet
1.28123.pdf
(340 pages)
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
- Current page: 187 of 340
- Download datasheet (6Mb)
Keeping Lists of On/Off Patterns
The
easier. The
example that uses the
There are two variables used in this command,
value
example, the
Terminal displays.
Example Program: SimpleLookup.bs2
' What's a Microcontroller - SimpleLookup.bs2
' Debug a value using an index and a lookup table.
' {$STAMP BS2}
' {$PBASIC 2.5}
value
index
index = 2
DEBUG ? index
LOOKUP index, [7, 85, 19, 167, 28], value
LOOKUP
√
√
√
√
√
stores the
LOOKUP index, [7, 85, 19, 167, 28], value
Decimal vs. Hexadecimal The basic digits in the decimal (base-10) number system are: 0,
1, 2, 3, 4, 5, 6, 7, 8, and 9. In the hexadecimal (base-16) number system the basic digits
are: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, b, C, d, E, F. Base-16 is used extensively in both computer
and microcontroller programming. Once you figure out how to display the characters A
through F, you can further modify your program to count in hexadecimal from 0 to F.
Enter and run SimpleLookup.bs2.
Run the program as-is, with the
Try setting the
Re-run the program after each change to the
value from the list gets placed in the
Optional: Modify the program by placing the
loop that counts from 0 to 4.
LOOKUP
command makes writing code for 7-segment LED display patterns much
LOOKUP
VAR
VAR
7
. If
LOOKUP
command lets you “look up” elements in a list. Here is a code
command places
index
index
Byte
Nib
command:
variable equal to numbers between 0 and 4.
is
1
, the
index
19
value
into
value
variable set equal to 2.
index
stores
value
variable.
LOOKUP
and
85
index
, and that’s what the Debug
. Since
value
command in a
variable and note which
. If the
index
is 2, in this
index
FOR…NEXT
is 0,
Related parts for 28123
Image
Part Number
Description
Manufacturer
Datasheet
Request
R
Part Number:
Description:
Microcontroller Modules & Accessories DISCONTINUED BY PARALLAX
Manufacturer:
Parallax Inc
Part Number:
Description:
BOOK UNDERSTANDING SIGNALS
Manufacturer:
Parallax Inc
Datasheet:
Part Number:
Description:
COMPETITION RING FOR SUMOBOT
Manufacturer:
Parallax Inc
Datasheet:
Part Number:
Description:
TEXT INFRARED REMOTE FOR BOE-BOT
Manufacturer:
Parallax Inc
Datasheet:
Part Number:
Description:
BOARD EXPERIMENT+LCD NX-1000
Manufacturer:
Parallax Inc
Datasheet:
Part Number:
Description:
CONTROLLER 16SERVO MOTOR CONTROL
Manufacturer:
Parallax Inc
Datasheet:
Part Number:
Description:
BASIC STAMP LOGIC ANALYZER
Manufacturer:
Parallax Inc
Datasheet:
Part Number:
Description:
IC MCU 2K FLASH 50MHZ SO-18
Manufacturer:
Parallax Inc
Datasheet: