Hello
How can I generate a DTMF signal with flowcode.
I would like to generate the following signals
The lower group has 4 frequencies; 697 , 770 , 852 and 941 Hz
The higher group has 4 frequenties; 1.209, 1.336, 1.477 and 1.633 Hz
These DTMF tones are similar as from a keypad from a telephone.
I did read that PICBASIC has a function for this, does flowcode this option or is there an example of this.
Maybe something like DTMF (port, bit, timeon, timeoff, Low hz, high hz)
DTMF (B,1,40,40,697,1.209)
Key DTMF Low,High freq
'1 [ 697, 1209 ]. . . . '6 [ 770, 1477 ]. . . . '* [ 941, 1209 ]
'2 [ 697, 1336 ]. . . . 'B [ 770, 1633 ]. . . . '0 [ 941, 1336 ]
'3 [ 697, 1477 ]. . . . '7 [ 852, 1209 ]. . . . '# [ 941, 1477 ]
'A [ 697, 1633 ]. . . . '8 [ 852, 1336 ]. . . . 'D [ 941, 1633 ]
'4 [ 770, 1209 ]. . . . '9 [ 852, 1477 ]
'5 [ 770, 1336 ]. . . . 'C [ 852, 1633 ]
Thanks
DTMF
Moderator: Benj
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: DTMF
Hello Taurus,
You could do this by using a fast timer interrupt and counter variables to generate two square waves at paricular frequencies. Once you have two output pins outputting your required frequencies you can then join the two signals together using diodes to prevent voltage travelling back to the uC. This then becomes your DTMF signal.
You could do this by using a fast timer interrupt and counter variables to generate two square waves at paricular frequencies. Once you have two output pins outputting your required frequencies you can then join the two signals together using diodes to prevent voltage travelling back to the uC. This then becomes your DTMF signal.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Re: DTMF
Hello
I did try a lot of things, but I don’t get the right frequencies that I need. Do you have a sample of them, so that I can go on. Otherwise I have to use the HT9200A. I suppose when it is possible with PICBASIC, then Flowcode surely should be able to do it.
Thanks
I did try a lot of things, but I don’t get the right frequencies that I need. Do you have a sample of them, so that I can go on. Otherwise I have to use the HT9200A. I suppose when it is possible with PICBASIC, then Flowcode surely should be able to do it.
Thanks
Taurus
- Steve
- Matrix Staff
- Posts: 3418
- Joined: Tue Jan 03, 2006 3:59 pm
- Has thanked: 114 times
- Been thanked: 422 times
- Contact:
Re: DTMF
Here's a link that might help:
http://www.brouhaha.com/~eric/pic/
Another idea is to use PWM to generate one of the signals and a continuous program loop to generate the other on a separate pin, and then combine the pins using diodes as Ben suggested.
Or you could generate the waveforms using multiple lookup tables on the same pin.
http://www.brouhaha.com/~eric/pic/
Another idea is to use PWM to generate one of the signals and a continuous program loop to generate the other on a separate pin, and then combine the pins using diodes as Ben suggested.
Or you could generate the waveforms using multiple lookup tables on the same pin.