DTMF code generator using an ATtiny1614 - dtmfgen_dac

DTMF code generator using an ATtiny1614 - dtmfgen_dac

I've created a simple DTMF library plus example program using one of the tinyAVR 1 series chips, namely an ATtiny1614. These chips have a built in DAC so the project is relatively easy to put together which a minimum of components .

I've tested it with a DTMF decoder which I published here: DTMF decoder library - #75 by 6v6gt and it appears to work reliably.

The example sketch shows how to initialise and use the library. It includes an example of a bulk check to send all 16 characters and a part which sends groups of user selected characters from the serial console command line.

The library was "inspired" by this work: GitHub - dilshan/dtmfgen: Library to generate DTMF tones only using Arduino Uno. and has been discussed in the following thread: DTMFgen not working . One main difference is that there is no external DAC resistor ladder.

To use it, put the files "dtmfgen_dac.h" and "dtmfgen_dac.cpp" into the same folder as the .ino file and follow the usage instructions in the .ino file.

I hope someone finds it useful or interesting.

Files:

dtmfgen_attiny1614_v0_01p.ino (4.2 KB)

dtmfgen_dac.cpp (5.3 KB)

dtmfgen_dac.h (2.3 KB)

Thanks very much. I will study the files carefully. But as you know, I need to send the output through the transformer out to the VOIP phone line. Anything you can suggest about the circuit to do that would be appreciated.

A simple audio amplifier with low gain could serve as the impedance converter, although an AVR port pin should have no problem driving a 600 Ohm load.

I did not look up what the line audio voltage level should be(*), but if a couple of volts RMS will work, just use appropriate capacitive coupling. 270 nF has impedance 600 Ohms at 1 kHz, which is a handy reference point.

(*) 5V logic has been used to generate tones for serial data modems since about 1970.