28123 Parallax Inc, 28123 Datasheet - Page 241

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
what you are”, and its notes are F, F, E, E, D, D, C. As with the first phrase the last note
is held twice as long as the other notes.
TwinkleTwinkle.bs2, you will need to expand each
forget to change the
ACTIVITY #4: MICROCONTROLLER MUSIC
Note durations are not recorded on sheet music in terms of milliseconds. Instead, they
are described as whole, half, quarter, eight, sixteenth, and thirty-second notes. As the
name suggests, a half note lasts half as long as a whole note. A quarter note lasts one
fourth the time a whole note lasts, and so on. How long is a whole note? It depends on
the piece of music being played. One piece might be played at a tempo that causes a
whole note to last for four seconds, another piece might have a two second whole note,
and yet another might have some other duration.
Rests are the time between notes when no tones are played. Rest durations are also
measured as whole, half, quarter, eighth, sixteenth and thirty-second.
A Better System for Storing and Retrieving Music
You can write programs that store twice as much music in your BASIC Stamp by using
bytes instead of words in your
make the musical notes easier to read by using some of the more common musical
conventions for notes and duration. This activity will start by introducing how to store
musical information in a way that relates to the concepts of notes, durations, and rests.
Tempo is also introduced, and it will be revisited in the next activity.
Here is an example of the
next example program. When played, it should resemble the song “Frere Jacques”. Only
the note characters are stored in the
LOOKDOWN
Notes
Durations
Modify TwinkleTwinkle.bs2 so that it plays the first two phrases of the song
instead of just the first phrase.
commands will be used to match up letters to their corresponding frequencies.
FOR…NEXT
DATA
DATA
DATA
loop so that it goes from 0 to 13 instead of from 0 to 6.
"C","D","E","C","C","D","E","C","E","F",
"G","E","F","G","Q"
DATA
directives that stores musical notes and durations for the
4,
2,
directives. You can also modify your program to
4,
4,
Notes DATA
4,
4,
To add this phrase to the song from
4,
2
DATA
4,
directive because
directive appropriately. Don’t
4,
4,
4,
4,
LOOKUP
4,
and

Related parts for 28123