Specifications
BASIC Stamp II
Parallax, Inc. • BASIC Stamp Programming Manual 1.8 • Page 257
2
DTMFout
DTMFOUT
pin,{ontime,offtime,}{,tone...}
Generate dual-tone, multifrequency tones (DTMF, i.e., telephone “touch”
tones).
•
Pin
is a variable/constant (0–15) that specifies the I/O pin to use.
This pin will be put into output mode temporarily during generation of
tones. After tone generation is complete, the pin is left in input mode,
even if it was previously an output.
•
Ontime
is an optional entry; a variable or constant (0 to 65535)
specifying a duration of the tone in milliseconds. If ontime is not
specified, DTMFout defaults to 200 ms on.
•
Offtime
is an optional entry; a variable or constant (0 to 65535)
specifying the length of silent pause after a tone (or between
tones, if multiple tones are specified). If offtime is not specified,
DTMFout defaults to 50 ms off.
•
Tone
is a variable or constant (0—15) specifying the DTMF tone
to send. Tones 0 through 11 correspond to the standard layout of
the telephone keypad, while 12 through 15 are the fourth-column
tones used by phone test equipment and in ham-radio applications.
0—9 Digits 0 through 9
10 Star (*)
11 Pound (#)
12—15 Fourth column tones A through D
Explanation
DTMF tones are used to dial the phone or remotely control certain radio
equipment. The BS2 can generate these tones digitally using the
DTMFout instruction. Figure I-2 shows how to connect a speaker or
audio amplifier to hear these tones; figure I-3 shows how to connect the
BS2 to the phone line. A typical DTMFout instruction to dial a phone
through pin 0 with the interface circuit of figure I-3 would look like this:
DTMFOUT 0,[6,2,4,8,3,3,3]' Call Parallax.
That instruction would be equivalent to dialing 624-8333 from a phone
keypad. If you wanted to slow the pace of the dialing to accommodate










