ECE 4760: Laboratory 2

DTMF generator.

Introduction.

You will construct a standard Dual Tone Multi-Frequency (DTMF) generator like those used on any tonch-tone or cell phone. As you press the buttons, the system will play the correct frequencies. The system will record up to 12 digits, then play them back through the DAC to simulate redial. To do this you will have to use Direct Digital Synthesis sampling at a fairly high rate to a DAC, then route the DAC output to speakers.


Procedure:

You will use a keypad to make a DTMF dialer with audio output to a speaker. Analog output will be through a SPI controlled DAC. The analog signal will be DTMF sine wave bursts generated using Direct Digital Synthesis (DDS) technique one one channel of the DAC. An example on the Dev board page (example DAC/DDS example) shows how you might implement a DDS, with the SPI DAC. Your DDS unit must resolve 256 table entries. For this lab, you will need to modulate the amplitude, and you will need to run two simultaneous DDS units and sum them. The sine wave table will need to be scaled to prevent overflow. For high quality audio synthesis, you are going to need to generate audio samples in an ISR based on a timer interrupt running at high rate. You probably will not have time in the ISR to use floating point arithmetic. Note that this example toggles the RA0 line to time the ISR rate. You need to omit that feature, if you attach the keypad to RA0!

SPI DAC

In this lab and every lab, make sure you are running Protothreads 1_2_1.
I suggest organizing the code as:


Assignment

  1. Write a Protothreads C program which implements a DTMF generator with the following specifcations:
  2. Connect the circuit to a speaker audio input (green phone plug) and listen the output. This will aid in debugging and is required for the demo.
  3. Demo this program to a staff member. Show that all specifications are met by verifying frequencies with an oscilloscope.
  4. At no time during the demo should you need to press RESET.
  5. Your written lab report should include the sections mentioned in the policy page, and :

     


Copyright Cornell University July 2, 2018