DTMF Generator Click Board
DTMF Generator Click Board
The DTMF Generator Click Board™ is a compact add-on board that generates DTMF (Dual-Tone Multi-Frequency) signals designed for MCU interfaces. This board features the HT9200A, a dual-tone multi-frequency decoder mostly used in mobile communications systems from Holtek Semiconductor Inc. The HT9200A tone generators can be instructed by an MCU to generate 16 dual tones and 8 single tones from its DTMF pin. It provides a Serial Mode interface, has a low total harmonic distortion and features a low current in the Stand-By mode.
The DTMF Generator Click Board™ is suitable for various applications such as security systems, home automation, remote control through telephone lines, communication systems, and more.
Software Support
We provide a library for the DTMF Generator Click on our LibStock page, as well as a demo application (example), developed using MikroElektronika compilers. The demo can run on all the main MikroElektronika development boards.
Library Description
The library covers all the necessary functions to control DTMF Generator board.
Key Functions
void dtmfgenerator_power_on ( void )
- Power ON function.void dtmfgenerator_transmit_signal ( uint8_t *digits, uint16_t delay_m_s )
- Transmit a DTMF signal function.
Example Description
The application is composed of three sections :
- System Initialization - Initializes GPIO and start to write log.
- Application Initialization - Initialization driver enables - GPIO, run the power-on sequence, also write log.
- Application Task - (code snippet) This is an example which demonstrates the use of DTMF Generator Click board. DTMF Generator click board DTMF generator transmits the signal for generating tone for digits : "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "A", "B", "C", "D", "*" and "#". All data logs write on USB uart changes.
void application_task ( ) { mikrobus_logWrite( "-------------------", _LOG_LINE ); mikrobus_logWrite( " TONE '0' ", _LOG_LINE ); dtmfgenerator_transmit_signal( DTMFGENERATOR_TONE_0, signal_duration ); dtmfgenerator_transmit_signal( DTMFGENERATOR_TONE_STOP, signal_duration ); mikrobus_logWrite( "-------------------", _LOG_LINE ); mikrobus_logWrite( " TONE '1' ", _LOG_LINE ); dtmfgenerator_transmit_signal( DTMFGENERATOR_TONE_1, signal_duration ); dtmfgenerator_transmit_signal( DTMFGENERATOR_TONE_STOP, signal_duration ); mikrobus_logWrite( "-------------------", _LOG_LINE ); mikrobus_logWrite( " TONE '2' ", _LOG_LINE ); dtmfgenerator_transmit_signal( DTMFGENERATOR_TONE_2, signal_duration ); dtmfgenerator_transmit_signal( DTMFGENERATOR_TONE_STOP, signal_duration ); mikrobus_logWrite( "-------------------", _LOG_LINE ); mikrobus_logWrite( " TONE '3' ", _LOG_LINE ); dtmfgenerator_transmit_signal( DTMFGENERATOR_TONE_3, signal_duration ); dtmfgenerator_transmit_signal( DTMFGENERATOR_TONE_STOP, signal_duration ); mikrobus_logWrite( "-------------------", _LOG_LINE ); mikrobus_logWrite( " TONE '4' ", _LOG_LINE ); dtmfgenerator_transmit_signal( DTMFGENERATOR_TONE_4, signal_duration ); dtmfgenerator_transmit_signal( DTMFGENERATOR_TONE_STOP, signal_duration ); mikrobus_logWrite( "-------------------", _LOG_LINE ); mikrobus_logWrite( " TONE '5' ", _LOG_LINE ); dtmfgenerator_transmit_signal( DTMFGENERATOR_TONE_5, signal_duration ); dtmfgenerator_transmit_signal( DTMFGENERATOR_TONE_STOP, signal_duration ); mikrobus_logWrite( "-------------------", _LOG_LINE ); mikrobus_logWrite( " TONE '6' ", _LOG_LINE ); dtmfgenerator_transmit_signal( DTMFGENERATOR_TONE_6, signal_duration ); dtmfgenerator_transmit_signal( DTMFGENERATOR_TONE_STOP, signal_duration ); mikrobus_logWrite( "-------------------", _LOG_LINE ); mikrobus_logWrite( " TONE '7 ", _LOG_LINE ); dtmfgenerator_transmit_signal( DTMFGENERATOR_TONE_7, signal_duration ); dtmfgenerator_transmit_signal( DTMFGENERATOR_TONE_STOP, signal_duration ); mikrobus_logWrite( "-------------------", _LOG_LINE ); mikrobus_logWrite( " TONE '8' ", _LOG_LINE ); dtmfgenerator_transmit_signal( DTMFGENERATOR_TONE_8, signal_duration ); dtmfgenerator_transmit_signal( DTMFGENERATOR_TONE_STOP, signal_duration ); mikrobus_logWrite( "-------------------", _LOG_LINE ); mikrobus_logWrite( " TONE '9' ", _LOG_LINE ); dtmfgenerator_transmit_signal( DTMFGENERATOR_TONE_9, signal_duration ); dtmfgenerator_transmit_signal( DTMFGENERATOR_TONE_STOP, signal_duration ); mikrobus_logWrite( "-------------------", _LOG_LINE ); mikrobus_logWrite( " TONE 'A' ", _LOG_LINE ); dtmfgenerator_transmit_signal( DTMFGENERATOR_TONE_A, signal_duration ); dtmfgenerator_transmit_signal( DTMFGENERATOR_TONE_STOP, signal_duration ); mikrobus_logWrite( "-------------------", _LOG_LINE ); mikrobus_logWrite( " TONE 'B' ", _LOG_LINE ); dtmfgenerator_transmit_signal( DTMFGENERATOR_TONE_B, signal_duration ); dtmfgenerator_transmit_signal( DTMFGENERATOR_TONE_STOP, signal_duration ); mikrobus_logWrite( "-------------------", _LOG_LINE ); mikrobus_logWrite( " TONE 'C' ", _LOG_LINE ); dtmfgenerator_transmit_signal( DTMFGENERATOR_TONE_C, signal_duration ); dtmfgenerator_transmit_signal( DTMFGENERATOR_TONE_STOP, signal_duration ); mikrobus_logWrite( "-------------------", _LOG_LINE ); mikrobus_logWrite( " TONE 'D' ", _LOG_LINE ); dtmfgenerator_transmit_signal( DTMFGENERATOR_TONE_D, signal_duration ); dtmfgenerator_transmit_signal( DTMFGENERATOR_TONE_STOP, signal_duration ); mikrobus_logWrite( "-------------------", _LOG_LINE ); mikrobus_logWrite( " TONE '*' ", _LOG_LINE ); dtmfgenerator_transmit_out_tone( DTMFGENERATOR_OUT_TONE_ASTERISK, signal_duration ); dtmfgenerator_transmit_out_tone( DTMFGENERATOR_OUT_TONE_STOP, signal_duration ); mikrobus_logWrite( "-------------------", _LOG_LINE ); mikrobus_logWrite( " TONE '#' ", _LOG_LINE ); dtmfgenerator_transmit_out_tone( DTMFGENERATOR_OUT_TONE_HASH, signal_duration ); dtmfgenerator_transmit_out_tone( DTMFGENERATOR_OUT_TONE_STOP, signal_duration ); Delay_ms( 2000 ); }
The full application code, and ready to use projects can be found on our LibStock page.
Other mikroE Libraries used in the example:
- GPIO
- UART
Additional Notes and Information
Depending on the development board you are using, you may need USB UART click, USB UART 2 click or RS232 click to connect to your PC, for development systems with no UART to USB interface available on the board. The terminal available in all MikroElektronika compilers, or any other terminal application of your choice, can be used to read the message.
MIKROSDK
This Click board™ is supported with mikroSDK - MikroElektronika Software Development Kit. To ensure proper operation of mikroSDK compliant Click board™ demo applications, mikroSDK should be downloaded from the LibStock and installed for the compiler you are using.
DTMF Generator Click Board
Frequently Asked Questions
Have a Question?
Be the first to ask a question about this.