DTMF Decoding Software with a PIC


On this page you will find some small projects which decode DMTF tones with software in a PIC. The software uses the groetzel algorithm and is large based on code by Radu Constantinescu. The software was adjusted to work on smaller micros like the 12F629 and 16F628A.

To generate the tones you can also use a PIC (sorry, the code is not yet posted), or get a freeware DMTF generator from the web.
I used this freeware version most of the time.

DMTF Code Lock using 12F629 (or 12F675)

The decoder uses an 8 pin 17F675 and has a single output. The output is activated if the correct DMTF tone sequence is received.
To SET the output issue the command #346962#1*, to RESET the output issue the command #346962#0*. The part between the hashes is the password required to modify the output. To modify the password the source needs to be updated.
After an invalid character, or if a timeout of three seconds is reached between the tones the controller will start a new scan for the password.


Source: dmtflock.asm
Include: tables.asm
Hex file: dtmflock.hex


8 Channel DMTF Remote Control Unit

This version uses a 16F628A and controlls up to 8 output lines.
The DTMF command syntax: #<password>#<channel><action>*.
The password is set at 3479, the channels run from 1 to 8 and the action is 0 (switch off) or 1 (switch on).

Some examples:

#3479#31* Turn ON channel 3
#3479#80* Turn OFF channel 8
#3477# Invalid password


Source: dmtf_8c.asm
Include: rxtables.asm
Hex file: dtmf_8c.hex