28122 Parallax Inc, 28122 Datasheet - Page 249

KIT WHAT'S A MICRO:PARTS ONLY

28122

Manufacturer Part Number
28122
Description
KIT WHAT'S A MICRO:PARTS ONLY
Manufacturer
Parallax Inc
Datasheet

Specifications of 28122

Accessory Type
Parts Kit
Product
Microcontroller Accessories
Core Processor
PIC16C57c
Flash
128 Bytes
Operating Supply Voltage
9 V
Board Size
31 mm x 16 mm
For Use With/related Products
Board of Education Full Kit
Lead Free Status / RoHS Status
Lead free / RoHS Compliant
LOOP
END
How MusicWithMoreFeatures.bs2 Works
Below is the musical data for the entire song. For each note in the
there is a corresponding entry in the
For example, the first note is a C note in the 7
dotted. Here is another example: the second from the last note (not including “Q”) is an
E note, in the 7
constant that sets the tempo for the song.
Notes
Octaves
Durations
Dots
BeatsPerMin
In the previous example program,
that will hold the duration of a whole note in ms. After this value is calculated,
WholeNote
program. The
in the same manner they were in the previous program. The
handled a little differently since now it has to be adjusted depending on the octave the
note is played in. The
the octave and dot features.
FREQOUT 9, noteDuration, noteFreq
index = index + 1
wholeNote
index
offset
noteLetter
noteFreq
noteDuration
will be used to determine all the other note durations, just like in the previous
index
th
octave. It’s a half note, and it is dotted. There is also a
,
DATA
DATA
DATA
DATA
CON
offset
noteOctave
VAR
VAR
VAR
VAR
VAR
VAR
,
"C","E","E","E","D","E","F","E","E","D","D",
"D","C","D","E","C","Q"
320
noteLetter
Word
Byte
Nib
Byte
Word
Word
7,
7,
4,
4,
0,
0,
WholeNote
Octaves, Durations,
and
7,
7,
2,
4,
0,
0,
noteDot
7,
7,
4,
4,
0,
0,
, and
was a constant. This time, it’s a variable
th
7,
7,
4,
2,
0,
1,
noteDuration
octave; it’s a quarter note and it’s not
variables have been added to handle
7,
7
4,
2
0,
0
7,
4,
0,
and
7,
2,
1,
variables are also used
Notes DATA
Dots DATA
noteFreq
7,
2,
0,
BeatsPerMin
7,
4,
0,
variable is
directives.
directive,
7,
2,
0,
7,
4,
0,

Related parts for 28122