28123 Parallax Inc, 28123 Datasheet - Page 268

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
Solutions
Q1. Our ears detect changes in air pressure as tones. A high pitched tone is from
Q2.
Q3. Use the optional
Q4. 1975.5 Hz, see Figure 8-3 on page 228.
Q5. Use the optional
Q6. Yes. Each
Q7. An octave is a group of 8 whole and 4 chromatic notes. To get a given note in
Q8.
E1. This problem can be solved either by manually increasing each tone by 500, or
E2. Modify the lines that check for the dotted note:
Utilizing
DEBUG "Increasing alarm...", CR
faster changes in air pressure, a low pitched tone from slower changes in air
pressure.
FREQOUT 15, 1000, 3000
(1000 ms).
The effect of each number:
15 – pin number 15.
1000 – duration of tone equals 1000 ms or one second.
3000 – the frequency of the tone, in Hertz, so this sends a 3000 Hz tone.
add the second frequency to the command, after a comma:
FREQOUT 15, 1000, 3000, 2000
DATA
keyword. For example:
the symbol parameter.
the next higher octave, multiply the frequency by two.
SELECT...CASE
basis, and executes different blocks of code depending on which case the
variable's value fits into.
by utilizing a
PAUSE 100
FOR frequency = 1500 TO 3000 STEP 500
NEXT
READ Dots + index, noteDot
FREQOUT 9, 500, frequency
PAUSE 500
directive to get the data from, include the symbol parameter after the
FOR...NEXT
DATA
FOR...NEXT
Freq2
Word
selects a variable or expression, evaluates it on a case by case
directive has a different symbol parameter. To specify which
loop:
modifier before each data item.
argument. To mix 3000 Hz and say, 2000 Hz, we simply
READ Notes, noteLetter.
loop with a
sends a 3000 Hz signal out pin 15 for one second
STEP
value of 500.
Manually increasing tone:
DEBUG "Increasing Alarm...",CR
PAUSE 100
FREQOUT 9, 500, 1500
PAUSE 500
FREQOUT 9, 500, 2000
PAUSE 500
FREQOUT 9, 500, 2500
PAUSE 500
FREQOUT 9, 500, 3000
PAUSE 500
In this example,
Notes
READ
is

Related parts for 28123