28122 Parallax Inc, 28122 Datasheet - Page 237
28122
Manufacturer Part Number
28122
Description
KIT WHAT'S A MICRO:PARTS ONLY
Manufacturer
Parallax Inc
Datasheet
1.28123.pdf
(340 pages)
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
- Current page: 237 of 340
- Download datasheet (6Mb)
Programming Musical Notes
The
to play music using a piezospeaker involves following a variety of rules used in playing
music using any other musical instrument. These rules apply to the same elements that
were used to make sound effects, frequency, duration, and pause. This next example
program plays some of the musical note frequencies on the piezospeaker, each with a
duration of half a second.
Example Program: DoReMiFaSolLaTiDo.bs2
' What's a Microcontroller - DoReMiFaSolLaTiDo.bs2
' Send an octave of half second tones using a piezoelectric speaker.
'{$STAMP BS2}
'{$PBASIC 2.5}
'Solfege
DEBUG "Do...", CR:
DEBUG "Re...", CR:
DEBUG "Mi...", CR:
DEBUG "Fa...", CR:
DEBUG "Sol..", CR:
DEBUG "La...", CR:
FREQOUT
√
Tuning Method: The keyboard in Figure 8-3 uses a method of tuning called equal
temperament. The frequencies are determined using a reference note, then multiplying it by
2
multiply by 2
B6, and so on. Here is an example of calculating the frequency for B6 using A6 as a
reference frequency:
Enter and run DoReMiFaSolLaTiDo.bs2
(n/12)
command is also useful for musical notes. Programming the BASIC Stamp
The frequency of A6 is 1760
2
1760 X 1.224 = 1975.5
1975.5 is the frequency of B6
for values of n = 1, 2, 3, etc. For example, you can take the frequency for A6, and
(2/12)
= 1.1224
(1/12)
Tone
FREQOUT 9,500,1047
FREQOUT 9,500,1175
FREQOUT 9,500,1319
FREQOUT 9,500,1396
FREQOUT 9,500,1568
FREQOUT 9,500,1760
to get the frequency for A6#. Multiply it by 2
' C6
' D6
' E6
' F6
' G6
' A6
Note
(2/12)
to get the frequency for
Related parts for 28122
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: