27220 Parallax Inc, 27220 Datasheet - Page 126

BOOK STAMPWORKS

27220

Manufacturer Part Number
27220
Description
BOOK STAMPWORKS
Manufacturer
Parallax Inc
Datasheet

Specifications of 27220

Accessory Type
Booklet
Product
Microcontroller Accessories
Lead Free Status / RoHS Status
Not applicable / Not applicable
For Use With/related Products
StampWorks
Lead Free Status / RoHS Status
Lead free / RoHS Compliant, Not applicable / Not applicable
' -----[ Subroutines ]-----------------------------------------------------
Dial_Phone:
Play_1_Note:
Play_2_Notes:
FOR idx = 5 TO 5000 STEP 5
NEXT
FOR idx = 5000 TO 5 STEP 50
NEXT
DEBUG CR, "Sound demo complete."
INPUT Speaker
END
DO
LOOP
RETURN
note1 = note1 << (oct1 - 1)
onTime = onTime */ TAdj
note1 = note1 */ FAdj
FREQOUT Speaker, onTime, note1
RETURN
note1 = note1 << (oct1 - 1)
note2 = note2 << (oct2 - 1)
onTime = onTime */ TAdj
note1 = note1 */ FAdj
note2 = note2 */ FAdj
FREQOUT Speaker, onTime, note1, note2
RETURN
note1 = idx */ FAdj
FREQOUT Speaker, onTime, note1, note1 */ 323
note1 = idx */ FAdj
FREQOUT Speaker, onTime, note1, note1 */ 323
READ eePntr, digit
IF (digit = 0) THEN EXIT
DEBUG digit
IF (digit >= "0" AND digit <- "9") THEN
ENDIF
eePntr = eePntr + 1
onTime = 150 */ TAdj
offTime = 75 */ TAdj
DTMFOUT Speaker, onTime, offTime, [digit - 48]
' frequency sweep up
' frequency sweep down
' read a digit
' when 0, number is done
' display digit
' don't digits
' update eePntr pointer
' note + octave
' play it
' note + octave
' note + octave
' play both

Related parts for 27220