BASIC stamp manual v2.2
5: BASIC Stamp Command Reference – DTMFOUT
BASIC Stamp Syntax and Reference Manual 2.2 • www.parallax.com • Page 179
DTMFOUT
BS1 BS2 BS2e BS2sx BS2p BS2pe BS2px
DTMFOUT Pin, { OnTime, OffTime, } [ Tone {, Tone…} ]
Function
Generate dual-tone, multifrequency tones (DTMF, i.e., telephone “touch”
tones).
• Pin is a variable/constant/expression (0 – 15) that specifies the I/O
pin to use. This pin will be set to output mode during generation of
tones and set to input mode afterwards.
• OnTime is an optional variable/constant/expression (0 – 65535)
specifying a duration of the tone. The unit of time and the default
time for OnTime is described in Table 5.19.
• OffTime is an optional variable/constant/expression (0 – 65535)
specifying the length of silent pause after a tone (or between tones, if
multiple tones are specified). The unit of time and the default time
for OffTime is described in Table 5.19.
• Tone is a variable/constant/expression (0 – 15) specifying the DTMF
tone to generate. 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.
Quick Facts
Table 5.19: DMTFOUT Quick Facts.
BS2, BS2e BS2sx BS2p BS2pe BS2px
Default OnTime
200 ms 80 ms 55 ms 196 ms
34 ms
Default OffTime
50 ms 50 ms 50 ms 50 ms
50 ms
Units in OnTime
1 ms 0.4 ms 0.265 ms 1 ms
0.166 ms
Units in OffTime
1 ms 1 ms 1 ms 1 ms
1 ms
Related Command
FREQOUT
Explanation
DTMF tones are used to dial the phone or remotely control certain radio
equipment. The BASIC Stamp can generate these tones digitally using the
DTMFOUT instruction. Figure 5.4 shows how to connect a speaker or
audio amplifier to hear these tones and Figure 5.5 shows how to connect
the BASIC Stamp to the phone line.
All
2