DTMF Generator click
DTMF Generator Click 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.
click Product page
Click library
- Author : Stefan Ilic
- Date : Jul 2021.
- Type : GPIO type
Software Support
We provide a library for the DTMFGenerator Click as well as a demo application (example), developed using MikroElektronika compilers. The demo can run on all the main MikroElektronika development boards.
Package can be downloaded/installed directly from NECTO Studio Package Manager(recommended way), downloaded from our LibStock™ or found on Mikroe github account.
Library Description
This library contains API for DTMFGenerator Click driver.
Standard key functions :
dtmfgenerator_cfg_setup
Config Object Initialization function.
dtmfgenerator_init
Initialization function.
Example key functions :
dtmfgenerator_set_dat
Set DATA ( RST ) pin state function.
dtmfgenerator_power_on
Power ON function.
dtmfgenerator_transmit_out_tone
The function transmit duration time of the desired tone.
Example Description
This is an example which demonstrates the use of DTMF Generator Click board.
The demo application is composed of two sections :
Application Init
Initialization driver enables - GPIO, run the power-on sequence, also write log.
log_cfg_t log_cfg;
LOG_MAP_USB_UART( log_cfg );
log_init( &logger, &log_cfg );
log_info( &logger, " Application Init " );
if ( DIGITAL_OUT_UNSUPPORTED_PIN ==
dtmfgenerator_init( &dtmfgenerator, &dtmfgenerator_cfg ) ) {
log_error( &logger, " Application Init Error. " );
log_info( &logger, " Please, run program again... " );
for ( ; ; );
}
log_printf( &logger, " Powering on device \r\n" );
log_printf( &logger, "--------------------\r\n" );
Delay_ms ( 1000 );
log_info( &logger, " Application Task " );
}
Application Task
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.
log_printf( &logger, " TONE '0' \r\n");
log_printf( &logger, "---------------\r\n" );
log_printf( &logger, " TONE '1' \r\n");
log_printf( &logger, "---------------\r\n" );
log_printf( &logger, " TONE '2' \r\n");
log_printf( &logger, "---------------\r\n" );
log_printf( &logger, " TONE '3' \r\n");
log_printf( &logger, "---------------\r\n" );
log_printf( &logger, " TONE '4' \r\n");
log_printf( &logger, "---------------\r\n" );
log_printf( &logger, " TONE '5' \r\n");
log_printf( &logger, "---------------\r\n" );
log_printf( &logger, " TONE '6' \r\n");
log_printf( &logger, "---------------\r\n" );
log_printf( &logger, " TONE '7' \r\n");
log_printf( &logger, "---------------\r\n" );
log_printf( &logger, " TONE '8' \r\n");
log_printf( &logger, "---------------\r\n" );
log_printf( &logger, " TONE '9' \r\n");
log_printf( &logger, "---------------\r\n" );
log_printf( &logger, " TONE 'A' \r\n");
log_printf( &logger, "---------------\r\n" );
log_printf( &logger, " TONE 'B' \r\n");
log_printf( &logger, "---------------\r\n" );
log_printf( &logger, " TONE 'C' \r\n");
log_printf( &logger, "---------------\r\n" );
log_printf( &logger, " TONE 'D' \r\n");
log_printf( &logger, "---------------\r\n" );
log_printf( &logger, " TONE '*' \r\n");
log_printf( &logger, "---------------\r\n" );
log_printf( &logger, " TONE '#' \r\n");
log_printf( &logger, "---------------\r\n" );
}
The full application code, and ready to use projects can be installed directly from NECTO Studio Package Manager(recommended way), downloaded from our LibStock™ or found on Mikroe github account.
Other Mikroe Libraries used in the example:
- MikroSDK.Board
- MikroSDK.Log
- Click.DTMFGenerator
Additional notes and informations
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. UART terminal is available in all MikroElektronika compilers.