We strongly encourage users to use Package manager for sharing their code on Libstock website, because it boosts your efficiency and leaves the end user with no room for error. [more info]
Rating:
Author: MIKROE
Last Updated: 2020-10-28
Package Version: 1.0.0.0
mikroSDK Library: 1.0.0.0
Category: Signal processing
Downloaded: 2070 times
Not followed.
License: MIT license
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.
Do you want to subscribe in order to receive notifications regarding "DTMF Generator click" changes.
Do you want to unsubscribe in order to stop receiving notifications regarding "DTMF Generator click" changes.
Do you want to report abuse regarding "DTMF Generator click".
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.Examples description
The application is composed of three sections :
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 );
}
Other mikroE Libraries used in the example:
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. The terminal available in all MikroElektronika compilers, or any other terminal application of your choice, can be used to read the message.