4D Systems Sound Module Library

Dependents:   STM32F030R8_SOMO-14D

SOMO-14D

The SOMO-14D is a tiny Audio-Sound module that can play back pre-stored audio files such as voice and music from a micro-SD memory card. The module supports 4-bit ADPCM audio files with sample rates from 6Khz up to 32Khz. By using the freely available software tool, any WAVE(.wav) or MP3(.mp3) file can be easily converted to the ADPCM(.ad4) format which can then be can be saved to a micro-SD memory card. The compact 14pin drop-in-module takes up very minimal board space and is ideal for any application that requires embedded audio.

The SERIAL-MODE provides a simple 2-wire interface to any micro-controller via its DATA and CLK lines. Audio operations such as PLAY, PAUSE,STOP and VOLUME control functions are all available to the host micro via simple serial commands.

SOMO-14D Library

The SOMO library handles all basic functions that access the hardware to set the commands that ensure SERIAL-MODE interfacing.

Some of the functions can make control of: - Initialization - Activity - Command

Initialization Function

  • void SOMO14DInit(void (*pfunc)(void));

Activity Function

  • INT8U SOMO14DisBusy(void);

Commanding Functions

  • void SOMO14DSerialOut(INT16U SOMO14Duint16);
  • void SOMO14DPause(void);
  • void SOMO14DStop(void);
  • void SOMO14DSetVol(INT8U *SOMO14DVol);
  • void SOMO14DSetAudio(INT16U SOMO14DAudioFileNo);

For check the function by capability please check the "functions" wiki

Revision:
2:673ecbaff67b
Parent:
0:41f21e0cf86f
--- a/SOMO14D.h	Sat Mar 14 01:06:07 2015 +0000
+++ b/SOMO14D.h	Sat Mar 14 01:39:34 2015 +0000
@@ -20,6 +20,7 @@
 *   09 03 15    Created.
 *   09 03 15    Modified.
 *   12 03 15    Import to mbed platform.
+*   13 03 15    Moved a function to a private state.
 *******************************************************************************
 */
 
@@ -30,12 +31,12 @@
 *******************************************************************************
 */
 
-#define SOMO_BUSY_PIN  PC_0              /* BUSY signal. Active HIGH output.  */
-#define SOMO_DATA_PIN  PC_1              /* Serial DATA input from host MCU   */
-#define SOMO_CLK_PIN   PC_2              /* Serial Clock input from host MCU  */
-#define SOMO_RESET_PIN PC_3              /* Master Reset. Active LOW trigger. */
-#define SOMO_WAIT_BIT  0.01              /* Wait between bits, base = 1 sec.  */
-#define SOMO_WAIT_IDLE 0.05              /* Wait between idle, base = 1 sec.  */
+#define SOMO_BUSY_PIN          PC_0      /* BUSY signal. Active HIGH output.  */
+#define SOMO_DATA_PIN          PC_1      /* Serial DATA input from host MCU   */
+#define SOMO_CLK_PIN           PC_2      /* Serial Clock input from host MCU  */
+#define SOMO_RESET_PIN         PC_3      /* Master Reset. Active LOW trigger. */
+#define SOMO_WAIT_BIT          0.01      /* Wait between bits, base = 1 sec.  */
+#define SOMO_WAIT_IDLE         0.05      /* Wait between idle, base = 1 sec.  */
 
 
 #define SOMO_SONG_CMD_MAX      0x01FF    /* 0x0000 = first; 0x01FF = last     */
@@ -55,7 +56,6 @@
 
 INT8U SOMO14DisBusy(void);               /* Check if SOMO is doing something */
 void  SOMO14DInit(void (*pfunc)(void));  /* Initialize the sound module      */
-void  SOMO14DSerialOut(INT16U SOMO14Duint16); /* Serial out command          */
 void  SOMO14DPause(void);                /* Hold the current song            */
 void  SOMO14DStop(void);                 /* Stop audio and go to sleep mode  */
 void  SOMO14DSetVol(INT8U *SOMO14DVol);  /* Increase/Decrease the volume     */