28123 Parallax Inc, 28123 Datasheet - Page 266

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
SUMMARY
This chapter introduced techniques for making sounds and musical tones using the
BASIC Stamp and a piezoelectric speaker. The
piezoelectric speaker high/low signals that cause it to make sound effects and/or musical
notes. The
to, the
argument can be used to mix tones.
Sound effects can be made by adjusting the frequency and duration of tones and the
pauses between. The value of the frequency can also be swept across a range of values or
mixed to create a variety of effects.
Making musical notes also depends on frequency, duration, and pauses. The value of the
FREQOUT
duration of the note (whole, half, quarter, etc.).
determined by the note’s letter and octave. Rests between notes are used to set the
duration of the
Playing simple songs using the BASIC Stamp can be done with a sequence of
commands, but there are better ways to store and retrieve musical data.
along with their optional
and word values using the
stored by
DATA
Some the symbol labels that were used were
Musical data can be stored in formats that lend themselves to translation from sheet
music. The sheet music style data can then be converted into
LOOKUP
variable values to change the octave of a note by dividing its frequency by a power of
two. Mathematic operations are also useful for note durations given either the tempo or
the duration of a whole note.
SELECT…CASE
SELECT…CASE
many choices as to what the variable could be and many different sets of actions that
directive’s optional
Duration
and
command’s
DATA
FREQOUT
LOOKDOWN
was introduced as a way of evaluating a variable on a case by case basis.
is particularly useful for examining characters or numbers when there are
PAUSE
directives. The
of the tone, the frequency of the tone (
command has arguments that control the I/O Pin the signal is sent
Duration
command.
commands. Mathematic operations can also be performed on
Symbol
Symbol
Word
argument is determined by the tempo of the song and the
prefix. The
READ
labels were used to store byte values using no prefix
label to differentiate between different types of data.
command’s
Notes
READ
FREQOUT
,
command was used to retrieve values
Durations
Address
The
command can be used to send a
Freq1
Freq1
argument always used the
,
Dots
). The optional
Frequency
value of the note is
, and
DATA
Octaves
directives
using the
FREQOUT
Freq2
.

Related parts for 28123