28123 Parallax Inc, 28123 Datasheet - Page 239
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: 239 of 340
- Download datasheet (6Mb)
Because each of these values occupies two bytes, accessing them with the read command
is different from accessing characters. The first 2093 is at
second 2093 is located at
+ 4
Here is a
then it places the
The next example program stores notes and durations using
FREQOUT
first few notes from the children’s song Twinkle Twinkle Little Star.
Example Program: TwinkleTwinkle.bs2
This example program demonstrates how to use the
to use the
, and the second 3136 is located at
√
FOR index = 0 to 6
NEXT
FOR…NEXT
command to play each note frequency for a specific duration. The result is the
READ
The values in the
the
What does the (index * 2) do? Each value stored in the
takes a word (two bytes), while each character in the
one byte. The value of
That’s fine for accessing the note characters using the command
index, noteLetter
variable needs to point twice as far down the
Frequencies + (index * 2), Word noteFreq
The Alphabet Song used by children to memorize their “ABCs” uses the same notes as
Twinkle Twinkle Little Star.
Enter and run TwinkleTwinkle.bs2
READ Notes + index, noteLetter
READ Frequencies + (index * 2), Word noteFreq
DEBUG noteLetter, "
Notes DATA
command to access the values in the lists.
Frequencies DATA
loop that places the
Frequencies + 2
Frequencies DATA
directive.
index
. The problem is that for every one byte in
", DEC noteFreq, CR
into a variable named
increases by one each time through the
Frequencies + 6
Notes DATA
. The first 3136 is located at
directive correspond with the musical notes in
Frequencies
DATA
into a variable named
.
Notes DATA
directive to store lists and how
Frequencies DATA
noteFreq
Frequencies + 0
, takes care of this.
list. The command
DATA
.
Notes
, and it uses the
directive only takes
READ Notes +
FOR…NEXT
Frequencies
noteLetter
, the
, but the
directive
index
READ
loop.
,
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: