;************************************************************************** ; dtmf001.asm ; ; PROGRAM: Simple Parrallel to Serial to take output from ; Holtek HT9170B/HT9170D DTMF detector ; ; AUTHOR: Doug Rice, ; doug.h.rice@btinternet.com
http://www.dougrice.plus.com/dev/dtmfCode/
DataSheet: http://www.dougrice.plus.com/dev/dtmfCode/HT9170v120.pdf
PIC Assembler code: http://www.dougrice.plus.com/dev/dtmfCode/dtmf001.asm
The Holtek chip has an analogue input and outputs.
DV - Goes high when DIGIT is detected, and low when DTMF ends. D0 to D3 - outputs DTMF digit code
In 2004 , I tried to use a PIC chip to take the outputs from the DTMF detector and output the digits detected.
I was using PIC chips with 4Mhz, and could not work out how to decode DTMF using the AtoD.
Recently I have recorded the audio using Audacity and decoded the audio samples using a web page.
https://www.dougrice.co.uk/cgi-bin/wiki.pl?WebAudio
http://www.dougrice.plus.com/dev/UART/UART2_DTMF.htm - The webpage decodes the Audio and uses the CANVAS to plot the decode
This demo simulated DTMF detection, and used SVG graphics to plot the output of the simulation:
http://www.dougrice.plus.com/dev/dtmfCode/dtmf1_g.svg
It should be possible to use Web Audio now.
https://homepages.plus.net/dougrice./dev/UART/micBaudotDecode.html - decodes BAUDOT, so converting to DTMF should be a few evenings work.
Sampled Audio:-
State Machine: - Spec
State Machine: - As the Testers and Windows present it
http://www.dougrice.plus.com/dtmf/dtmf1.htm
1209 1336 1477 1633 | | | | 697 -- 1 -- -- 2 -- -- 3 -- -- A -- | | | | 770 -- 4 -- -- 5 -- -- 6 -- -- B -- | | | | 852 -- 7 -- -- 8 -- -- 9 -- -- C -- | | | | 941 -- * -- -- 0 -- -- # -- -- D -- | | | |
1) sample: measure input using AtoD
2) filter: Use A=A*M + input or walsh
3) quantify: - every n ms scan levels.
leak values
4) Logic: - are any tone detectors above a threshold? Which Pair are the largest Has pair changes since last poll? Output Char?
5) serial out Send the digit to the serial port
arrays of quadrature square waves using A= A + M
Every gen_ts seconds add M to A and if gen > max/2 subtract max.
fr[16],fi[16]