28123 Parallax Inc, 28123 Datasheet - Page 252
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: 252 of 340
- Download datasheet (6Mb)
The remainder of this example program works the same way that it did in the previous
example program:
Your Turn – Playing a Tune with More than One Octave
MusicWithMoreFeatures.bs2 made use of rests, but it stayed in one octave. The tune
“Take Me Out to the Ball Game” shown below plays most of its notes in the 6
There are two notes in the 7
Notes
Octaves
Durations
Dots
BeatsPerMin
√
√
√
MusicWithMoreFeaturesYourTurn.bs2.
LOOP
END
Save the example program under the name
Modify the program by replacing the four data directives and one constant
declaration with these:
Run the program and verify that it sounds right.
Integer math The BASIC Stamp does not automatically process a number like 1.5. When
performing math, it only works with integers: …, -5, -4, -3, -2, -1, 0, 1, 2, 3, … The best
solution for multiplying by 1.5 is to multiply by 3/2. First, multiply by 3, and then divide by 2.
There are many ways to program the BASIC Stamp to handle fractional values. You can
program the BASIC Stamp to use integers to figure out the fractional portion of a number.
This is introduced in the Basic Analog and Digital Student Guide. There are also two
operators that make fractional values easier to work with, and they are:
are explained in detail in the Applied Sensors Student Guide and in the BASIC Stamp
Manual.
FREQOUT 9, noteDuration, noteFreq
index = index + 1
DATA
DATA
DATA
DATA
CON
th
octave, and they make a big difference to the way it sounds.
"C","C","A","G","E","G","D","P","C","C","A",
"G","E","G","Q"
240
6,
6,
2,
4,
0,
0,
7,
6,
4,
4,
0,
0,
6,
6
4,
2
0,
1
6,
4,
0,
6,
4,
0,
6,
2,
1,
6,
2,
0,
6,
4,
0,
**
and
6,
2,
0,
*/
th
7,
4,
0,
. These
octave.
6,
4,
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: