28123 Parallax Inc, 28123 Datasheet - Page 305

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. Whenever possible! It is much easier to find, isolate and prevent problems.
Q2. Two. ReadPushbuttonState.bs2 from Chapter #3 and ReadPotWithRcTime.bs2
Q3. While the
Q4.
E1. a. Build the piezospeaker circuit on the breadboard.
E2. The key to solving this problem is to use the
P1. Project 1 uses the same schematic as Figure 10-1. p. 282 with the addition of a
P2. Project 2 uses the same schematic as Project 1.
from Chapter #5.
assigns a name to RAM, the
pin. This name can then be used in place of the I/O pin number throughout the
program. PBASIC figures out whether you are using it as an output to send a
high/low signal or as an input variable to store the state sensed by the I/O pin (1
or 0).
END
of the loop, and then the program keeps on running.
b. Run TestPiezoWithFreqout.bs2 from Chapter 8 to test the speaker.
c. Integrate the piezospeaker into the program.
introduced the
STR
code below the
piezo speaker connected to P11.
' What's a Microcontroller - Ch10Prj02_AddSpeakerToSensorArray.bs2
' Use Debug Terminal to choose to read one of five sensors.
' Project 2 - Add a 5th menu item that makes a piezo speaker beep
' for 1.5 seconds at a frequency of 2kHz.
' {$STAMP BS2}
' {$PBASIC 2.5}
' What's a Microcontroller –
' TestPiezoWithFreqout.bs2
' Send a tone to the piezo speaker
' using the FREQOUT command.
'{$STAMP BS2}
'{$PBASIC 2.5}
DEBUG "Tone sending...", CR
FREQOUT 11, 1500, 2000
DEBUG "Tone done."
DEBUG CR, CR, "You entered: ", STR userEntry, CR
formatter will also work with
ends the program, it doesn't run anymore. By contrast
CON
directive assigns a name to a number, and while the
STR
DEBUGIN
formatter with
statement.
PIN
directive assigns a name to a BASIC Stamp I/O
DEBUG
DEBUGIN
. This can be done by adding this line of
, so it makes sense to guess that the
STR
formatter with
P11
EXIT
DEBUG
just breaks out
VAR
Vss
. The text
directive

Related parts for 28123