TOP Contributors

  1. MIKROE (2652 codes)
  2. Alcides Ramos (351 codes)
  3. Shawon Shahryiar (307 codes)
  4. jm_palomino (112 codes)
  5. Chisanga Mumba (90 codes)
  6. S P (73 codes)
  7. dany (71 codes)
  8. MikroBUS.NET Team (35 codes)
  9. NART SCHINACKOW (34 codes)
  10. Armstrong Subero (27 codes)

Most Downloaded

  1. Timer Calculator (136638 times)
  2. FAT32 Library (69843 times)
  3. Network Ethernet Library (55895 times)
  4. USB Device Library (46228 times)
  5. Network WiFi Library (41867 times)
  6. FT800 Library (41087 times)
  7. GSM click (28946 times)
  8. PID Library (26402 times)
  9. mikroSDK (26320 times)
  10. microSD click (25329 times)
Libstock prefers package manager

Package Manager

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]

< Back
mikroSDK Library

DTMF Decoder click

Rating:

0

Author: MIKROE

Last Updated: 2024-04-03

Package Version: 2.1.0.13

mikroSDK Library: 2.0.0.0

Category: Signal processing

Downloaded: 87 times

Not followed.

License: MIT license  

DTMF Decoder Click is a compact add-on board that contains an integrated DTMF receiver with enhanced sensitivity. This board features the MT8870D, a complete DTMF receiver integrating the band-split filter and digital decoder functions from Microchip Technology.

No Abuse Reported

Do you want to subscribe in order to receive notifications regarding "DTMF Decoder click" changes.

Do you want to unsubscribe in order to stop receiving notifications regarding "DTMF Decoder click" changes.

Do you want to report abuse regarding "DTMF Decoder click".

  • Information
  • Comments (0)

mikroSDK Library Blog


DTMF Decoder click

DTMF Decoder Click is a compact add-on board that contains an integrated DTMF receiver with enhanced sensitivity. This board features the MT8870D, a complete DTMF receiver integrating the band-split filter and digital decoder functions from Microchip Technology.

dtmf_decoder_click.png

click Product page


Click library

  • Author : Stefan Nikolic
  • Date : jan 2021.
  • Type : I2C type

Software Support

We provide a library for the DTMFDecoder 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 DTMFDecoder Click driver.

Standard key functions :

  • dtmfdecoder_cfg_setup Config Object Initialization function.

    void dtmfdecoder_cfg_setup ( dtmfdecoder_cfg_t *cfg );
  • dtmfdecoder_init Initialization function.

    DTMFDECODER_RETVAL dtmfdecoder_init ( dtmfdecoder_t *ctx, dtmfdecoder_cfg_t *cfg );
  • dtmfdecoder_default_cfg Click Default Configuration function.

    void dtmfdecoder_default_cfg ( dtmfdecoder_t *ctx );

Example key functions :

  • dtmfdecoder_tone_read This function reads a last registered tone and returns decoded data in character format.

    uint8_t dtmfdecoder_tone_read ( dtmfdecoder_t *ctx );
  • dtmfdecoder_delayed_steering_check This function checks the state of the StD pin.

    uint8_t dtmfdecoder_delayed_steering_check ( dtmfdecoder_t *ctx );
  • dtmfdecoder_powerdown_off This function powers up the device and along with the oscillator.

    void dtmfdecoder_powerdown_off ( dtmfdecoder_t *ctx );

Example Description

This example shows the basic tone capture of DTMF frequencies, decoding and representing them on the UART LOG.

The demo application is composed of two sections :

Application Init

Initializes I2C and UART LOG drivers and powers on the device.


void application_init ( void ) {
    log_cfg_t log_cfg;                  /**< Logger config object. */
    dtmfdecoder_cfg_t dtmfdecoder_cfg;  /**< Click config object. */

    /** 
     * Logger initialization.
     * Default baud rate: 115200
     * Default log level: LOG_LEVEL_DEBUG
     * @note If USB_UART_RX and USB_UART_TX 
     * are defined as HAL_PIN_NC, you will 
     * need to define them manually for log to work. 
     * See @b LOG_MAP_USB_UART macro definition for detailed explanation.
     */
    LOG_MAP_USB_UART( log_cfg );
    log_init( &logger, &log_cfg );
    log_info( &logger, " Application Init " );

    // Click initialization.

    dtmfdecoder_cfg_setup( &dtmfdecoder_cfg );
    DTMFDECODER_MAP_MIKROBUS( dtmfdecoder_cfg, MIKROBUS_1 );
    err_t init_flag = dtmfdecoder_init( &dtmfdecoder, &dtmfdecoder_cfg );
    if ( init_flag == I2C_MASTER_ERROR ) {
        log_error( &logger, " Application Init Error. " );
        log_info( &logger, " Please, run program again... " );

        for ( ; ; );
    }

    dtmfdecoder_default_cfg ( &dtmfdecoder );
    Delay_ms ( 100 );
    log_info( &logger, " Application Task " );
}

Application Task

Checks the delayed steering for incoming tones and decoding them on the UART LOG. Holding the same key will recognize multiple tone generation, the tone register delay constant can be set to adjust the tolerance.


void application_task ( void ) {
    uint8_t result;

    if ( dtmfdecoder_delayed_steering_check( &dtmfdecoder ) ) {
        result = dtmfdecoder_tone_read( &dtmfdecoder );
        log_printf( &logger, " Detected key tone:\t%c\r\n", result );
        Delay_ms ( tone_register_delay );
    }
}

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.DTMFDecoder

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.


ALSO FROM THIS AUTHOR

mikromedia for PIC24EP - Examples

0

Set of examples for mikromedia for PIC24EP.. Provided examples demonstrate working with mikromedia's various features and modules:

- Accelerometer
- MMC SD card
- MP3
- Serial Flash
- TFT
- Touch Panel
- USB

[Learn More]

Brushless 26 click

0

Brushless 26 Click is a compact add-on board that controls brushless DC motors with any MCU. This board features the DRV8317H, a three-phase PWM motor driver from Texas Instruments. It provides three integrated MOSFET half-bridges for driving three-phase brushless DC (BLDC) motors with 5V, 9V, 12V, or 18V DC rails or 2s to 4s batteries.

[Learn More]

Thermo 21 click

0

Thermo 21 Click is a compact add-on board that provides an accurate temperature measurement. This board features the ADT7301, a high-precision digital temperature sensor from Analog Devices. The ADT7301 houses an on-chip temperature sensor, a 13-bit A/D converter, a reference circuit, and serial interface logic functions in one package. Characterized by its high accuracy (up to ±0.5°C typical) and high resolution of 0.03125°C, this temperature sensor provides temperature data to the host controller with a configurable SPI interface. This Click board™ is appropriate for process control, environmental monitoring, domestic appliances, electronic test equipment, or other temperature measurement applications.

[Learn More]