TOP Contributors

  1. MIKROE (2660 codes)
  2. Alcides Ramos (357 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 (137017 times)
  2. FAT32 Library (70143 times)
  3. Network Ethernet Library (56029 times)
  4. USB Device Library (46353 times)
  5. Network WiFi Library (41968 times)
  6. FT800 Library (41295 times)
  7. GSM click (29062 times)
  8. mikroSDK (26501 times)
  9. PID Library (26452 times)
  10. microSD click (25423 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

REC-PLAY click

Rating:

5

Author: MIKROE

Last Updated: 2019-03-05

Package Version: 1.0.0.0

mikroSDK Library: 1.0.0.0

Category: Signal processing

Downloaded: 3595 times

Not followed.

License: MIT license  

Rec&amp;Play Click is a digital voice recorder on a Click board. It is based around the ISD3900, a multi-message record and playback device.

No Abuse Reported

Do you want to subscribe in order to receive notifications regarding "REC-PLAY click" changes.

Do you want to unsubscribe in order to stop receiving notifications regarding "REC-PLAY click" changes.

Do you want to report abuse regarding "REC-PLAY click".

  • mikroSDK Library 2.0.0.0
  • Comments (0)
DOWNLOAD LINK RELATED COMPILER CONTAINS
mikroBasic PRO for ARM
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroBasic PRO for AVR
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroBasic PRO for dsPIC30/33 & PIC24
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroBasic PRO for FT90x
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroBasic PRO for PIC
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroBasic PRO for PIC32
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroC PRO for ARM
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroC PRO for AVR
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroC PRO for dsPIC30/33 & PIC24
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroC PRO for FT90x
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroC PRO for PIC
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroC PRO for PIC32
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroPascal PRO for ARM
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroPascal PRO for AVR
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroPascal PRO for dsPIC30/33 & PIC24
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroPascal PRO for FT90x
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroPascal PRO for PIC
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroPascal PRO for PIC32
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc

mikroSDK Library Blog

Rec-Play click

Rec-Play click

Native view of the Rec-Play click board.

View full image
Rec-Play click

Rec-Play click

Front and back view of the Rec-Play click board.

View full image

Library Description

Library offers a choice to perform control of the REC&PLAY Click board by sending commands to the ISD3900 via SPI interface. Commands include message recording, recorded message playing, sending or receiving compressed audio data, digital reading and writting, device configuration, device status and interrupt checking... All functions return device status byte, so on that way user can check status of the device and SPI interface after each sent command. For more details check documentation.

Key functions:

  • T_RECPLAY_RETVAL recplay_recordMsg( void ) - Function initiates a managed record at first available location in memory.
  • T_RECPLAY_RETVAL recplay_playMsg( uint32_t memAddr, uint16_t sectorOffset ) - Function initiates a play of a recorded message starting at a specified address, with a specified sector offset.
  • T_RECPLAY_RETVAL recplay_stop( void ) - Function stops any current audio command.
  • T_RECPLAY_RETVAL recplay_eraseMsg( uint32_t memAddr ) - Function erases the message starting at the specified address.

Examples description

The application is composed of the three sections :

  • System Initialization - Initializes peripherals and pins.
  • Application Initialization - Initializes SPI interface in properly mode and performs the all necessary commands to put device in properly working mode (chip reset, chip power up, chip erasing, clock configuration).
  • Application Task - (code snippet) - Performs the chip configuration for recording message via microphone, then records a message for 8 seconds to specified memory location. After that reads the recorded message address with message length and then plays a recorded message. When playback is done erases a recorded message from memory. Repeats the all operation every 10 seconds. Note : The ISD3900 must be properly configured to work in record mode every time when user wants to record a message. When user wants to play a recorded message, then ISD3900 must be properly configured, but now to work in play mode.
void applicationTask()
{
    mikrobus_logWrite( "Preparing to record a message...", _LOG_LINE );
    for (i = 0; i < 32; i++)
    {
        if ((i != _RECPLAY_CFG0A_REG) && (i != _RECPLAY_CFG1C_REG) && (i != _RECPLAY_CFG1E_REG))
        {
            waitReady();
            tempVar = configRecMic[ i ];
            statusByte = recplay_writeCnfgReg( i, &tempVar, 1 );
        }
    }
    waitReady();
    Delay_ms( 2000 );

    mikrobus_logWrite( "Message Recording", _LOG_TEXT );
    statusByte = recplay_recordMsgAddr( 0x12000 );
    timeRecord( 8 );
    statusByte = recplay_stop();
    waitCmdFin();
    mikrobus_logWrite( "End of recording", _LOG_LINE );
    
    mikrobus_logWrite( "---------------------------------------", _LOG_LINE );
    statusByte = recplay_readMsgAddr( &messageAddr, &messageLength );
    LongWordToHex( messageAddr, text );
    mikrobus_logWrite( "Message Address: 0x", _LOG_TEXT );
    mikrobus_logWrite( text, _LOG_LINE );
    WordToStr( messageLength, text );
    mikrobus_logWrite( "Message Length: ", _LOG_TEXT );
    mikrobus_logWrite( text, _LOG_LINE );
    mikrobus_logWrite( "---------------------------------------", _LOG_LINE );
    Delay_ms( 1000 );

    mikrobus_logWrite( "Preparing to play a message...", _LOG_LINE );
    setVolume( 100 );
    for (i = 0; i < 32; i++)
    {
        if ((i != _RECPLAY_CFG0A_REG) && (i != _RECPLAY_CFG1C_REG) && (i != _RECPLAY_CFG1E_REG))
        {
            waitReady();
            if (i == _RECPLAY_CFG03_REG)
            {
                tempVar = volume;
            }
            else
            {
                tempVar = configPlayPwmSpk[ i ];
            }
            statusByte = recplay_writeCnfgReg( i, &tempVar, 1 );
        }
    }
    waitReady();
    Delay_ms( 2000 );

    mikrobus_logWrite( "Message is playing...", _LOG_LINE );
    statusByte = recplay_playMsg( 0x12000, 0 );
    waitCmdFin();
    mikrobus_logWrite( "End of playing", _LOG_LINE );
    
    mikrobus_logWrite( "---------------------------------------", _LOG_LINE );
    ByteToHex( statusByte, text );
    mikrobus_logWrite( "Status Byte: 0x", _LOG_TEXT );
    mikrobus_logWrite( text, _LOG_LINE );
    ByteToHex( interrByte, text );
    mikrobus_logWrite( "Interrupt Byte: 0x", _LOG_TEXT );
    mikrobus_logWrite( text, _LOG_LINE );
    mikrobus_logWrite( "---------------------------------------", _LOG_LINE );
    Delay_ms( 1000 );
    
    mikrobus_logWrite( "Message Erasing...", _LOG_LINE );
    statusByte = recplay_eraseMsg( 0x12000 );
    waitCmdFin();
    mikrobus_logWrite( "End of erasing", _LOG_LINE );
    
    mikrobus_logWrite( "***************************************", _LOG_LINE );
    mikrobus_logWrite( "", _LOG_LINE );
    Delay_ms( 10000 );
}

Additional Functions :

  • void waitCmdFin( - Waits until current command has properly finished.
  • void waitReady() - Waits until SPI interface was ready for new command.
  • void waitPowerUp() - Waits until ISD3900 has powered up.
  • void timeRecord( uint32_t secondsTime ) - Performs the desired time in seconds for message recording.
  • void setVolume( uint8_t volumeSel )  - Sets a volume on the desired value (0 - 100%) for a message playing.

Other mikroE Libraries used in the example:

  • Conversions
  • SPI
  • UART

Additional notes and informations

Depending on the development board you are using, you may need USB UART clickUSB 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.

ALSO FROM THIS AUTHOR

GNSS 11 click

0

GNSS 11 Click is a compact add-on board that provides fast positioning capability. This board features the EVA-M8M, a concurrent GNSS module from u-blox. The module provides a reception of GPS, GLONASS, Galileo, QZSS, SBAS, and BeiDou. It delivers high sensitivity and minimal acquisition times, with concurrent reception of up to three GNSS, achieved by a dual-frequency RF front-end architecture. This Click board™ makes the perfect solution for the development of both acquisition and tracking devices and represents an ideal product for automotive, consumer, and industrial tracking applications.

[Learn More]

Waveform 4 click

0

Waveform 4 Click is a compact add-on board that represents a high-performance signal generator. This board features the AD9106, a quad-channel, 12-bit, 180MSPS waveform generator, integrating on-chip static random access memory (SRAM) and direct digital synthesis (DDS) for complex waveform generation from Analog Devices. The DDS is up to a 180 MHz master clock sinewave generator with a 24-bit tuning word allowing 10.8 Hz/LSB frequency resolution.

[Learn More]

Angle 10 click

0

Angle 10 Click is a compact add-on board that detects the absolute angular position of a permanent magnet. This board features the AS5070A, a high-resolution angular position sensor with an analog output for precise absolute angle measurement from ams AG. Based on a Hall sensor technology, the AS5070A measures the orthogonal component of the flux density over a full-turn rotation and compensates for external stray magnetic fields with a robust architecture based on a 14-bit sensor array and analog front-end. Only a simple two-pole magnet rotating over the center of the AS5070A is required to measure the angle, providing an instant indication of the magnet’s angular position.

[Learn More]