28129 Parallax Inc, 28129 Datasheet - Page 112

TEXT BASIC ANALOG & DIGITAL

28129

Manufacturer Part Number
28129
Description
TEXT BASIC ANALOG & DIGITAL
Manufacturer
Parallax Inc
Type
Programmingr
Datasheet

Specifications of 28129

Style
Book
Title
Basic Analog and Digital
Contents
Basic Analog and Digital Text
Product
Microcontroller Accessories
Lead Free Status / RoHS Status
Not applicable / Not applicable
defines an octave of musical notes and their corresponding frequencies. A list of these
musical notes is then played using
Reprogram the Circuit for Musical Notes
' Basic Analog and Digital - PL5_3R0.bs2
' Charge!!!
' {$STAMP BS2}
' {$PBASIC 2.5}
C
CSharp
D
DSharp
E
F
FSharp
G
GSharp
A
ASharp
B
DEBUG CLS
FREQOUT 10, 100, C
DEBUG HOME, "Frequency of PWM sine wave output is ", DEC4 C, " Hz.", CR
FREQOUT 10, 100, D
DEBUG "Frequency of PWM sine wave output is ", DEC4 D, " Hz.", CR
FREQOUT 10, 100, DSharp
DEBUG "Frequency of PWM sine wave output is ", DEC4 DSharp, " Hz.", CR
FREQOUT 10, 200, G
DEBUG "Frequency of PWM sine wave output is ", DEC4 G, " Hz.", CR
FREQOUT 10, 100, DSharp
DEBUG "Frequency of PWM sine wave output is ", DEC4 DSharp, " Hz.", CR
FREQOUT 10, 200, G
DEBUG "Frequency of PWM sine wave output is ", DEC4 G, " Hz.", CR
The Output
The output sample shown in Figure 5-8 is the last of the eight that are played. The tones
sound significantly better than the equivalent pulse trains, which in general have more of
a kazoo sound to them.
CON
CON
CON
CON
CON
CON
CON
CON
CON
CON
CON
CON
2093
2218
2349
2489
2637
2794
2960
3136
3322
3520
3729
3951
FREQOUT
commands. Let's try it.

Related parts for 28129