28123 Parallax Inc, 28123 Datasheet - Page 235

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
FREQOUT 9, 4000, 2000, 2001
DEBUG "Frequency = 2000 + 2002", CR
FREQOUT 9, 4000, 2000, 2002
DEBUG "Frequency = 2000 + 2003", CR
FREQOUT 9, 4000, 2000, 2003
DEBUG "Frequency = 2000 + 2005", CR
FREQOUT 9, 4000, 2000, 2005
DEBUG "Frequency = 2000 + 2010", CR
FREQOUT 9, 4000, 2000, 2010
DEBUG "Done", CR
END
Your Turn – Condensing the Code
MixingTones.bs2 was written to demonstrate some interesting things that can happen
when you mix two different frequencies using the
argument. However, it is extremely inefficient.
ACTIVITY #3: MUSICAL NOTES AND SIMPLE SONGS
Figure 8-3 shows the rightmost 25 keys of a piano keyboard.
frequencies at which each wire inside the piano vibrates when that piano key is struck.
The keys and their corresponding notes are labeled C6 through C8. These keys are
separated into groups of 12. Each group spans one octave, made up of 8 white keys and 4
black keys. The sequence of notes repeats itself every 12 keys. Notes of the same letter
are related by frequency, doubling with each higher octave. For example, C7 is twice the
frequency of C6, and C8 is twice the frequency of C7. Likewise, if you go one octave
down, the frequency will be half the value; for example, A6 is half the frequency of A7.
Modify MixingTones.bs2 so that it cycles through the
ranging from 2001 to 2005 using a word variable and a loop.
Internet search for – “musical scale”: By using the words "musical scale" in a search
engine like Google or Yahoo, you will find lots of fascinating information about the history,
physics and psychology of the subject. The 12 note per octave scale is the main scale of
western music. Other cultures use scales that contain 2 to 35 notes per octave.
FREQOUT
command’s optional
It also shows the
Freq2
arguments
Freq2

Related parts for 28123