28123 Parallax Inc, 28123 Datasheet - Page 263
28123
Manufacturer Part Number
28123
Description
TEXT WHAT'S A MICROCONTROLLER
Manufacturer
Parallax Inc
Type
Programmingr
Datasheet
1.28123.pdf
(340 pages)
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
- Current page: 263 of 340
- Download datasheet (6Mb)
' -----[ Subroutine - Check For '.' Indicating 1.5 Duration ]-------------
' -----[ Subroutine - Find Comma and Play Note/Duration ]-----------------
How MicroMusicWithRtttl.bs2 Works
This example program is fun to use, and it shows the kind of code you will be able to
write with some practice. However, it was included in this text more for fun than for the
coding concepts it employs.
If you examine the code briefly, you might notice that you have already used all of the
commands and operators in the program. Here is a list of the elements in this application
example that should, by now, be familiar:
CheckForDot:
PlayNote:
•
ENDIF
RETURN
READ RTTTL_File + counter, char
SELECT char
ENDSELECT
RETURN
READ RTTTL_File + counter, char
SELECT char
ENDSELECT
RETURN
CASE "."
CASE ","
Comments to help explain your code
duration = duration * 3 / 2
counter = counter + 1
counter = counter + 1
READ Octave8 + (index * 2), Word noteFreq
noteOctave = 8 - noteOctave
noteFreq = noteFreq / (DCD noteOctave)
IF noteFreq = 0 THEN
ELSE
ENDIF
FREQOUT SpeakerPin, duration, noteFreq
PAUSE duration
' Check for dot indicating
' multiply duration by 3/2.
' If dot found, multiply by
' 3/2 and increment counter,
' else, do nothing and
' return.
' Find last comma in the
' current note entry.
' fetch the note frequency
' from data, and play it, or
' pause if frequency = 0.
Then,
Related parts for 28123
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: