+ Reply to Thread
Results 1 to 3 of 3
  1. #1
    Join Date
    Nov 2006
    Location
    Murrieta, CA
    Posts
    54

    Post Playing sound files from 4dSystems SOMO Module

    Well, 4dsystems has done it again. another great product. talking about the nice and compact SOMO module. this little module is very simple to interface. 1 clock, 1 data, 3.3v, and ground and you got a killer sound effects module.

    I just happened to have some busted headphones and ripped out one of the speakers. since all the parts i use is surface mount i had to get a breadboard adapter for my small components. The link above has all the information you need to wire up your somo module and recommend you follow the datasheets guidelines.

    On my setup i had to created an adapter board which includes 3.3v regulator, 450 ohm resistors for clock, data, and busy signals interfacing with a 5v systems (very important). and also has a busy signal LED which indicates when the somo is playing a file.

    in the project shown in the video below is one of my favorite people. if you dont know first person shooter games his name is FPS Doug. i chose this small clip so you can see the versatility of video and audio combined. however the longer the movie clip the more out of sync the audio will be so i kept this clip short.

    Below is the code to run audio files from the somo if you would like detailed information about displaying video check out my article HERE.

    Note: that through trial and error only the file address is needed, if you send the command to play after you send the address your file will stop as play and stop share same command. Enjoy ! Boom Headshot !

    - Gary D.


    Hi, we are pleased to see that you are using our forum.

    We'd like you to become a member of our community. Membership is FREE, please REGISTER and view our forums without these annoying reminders!

    Once registered you may post on the forums, download from the file areas and use the WIKI without interruption.






    Code:
    define OSC 20
    
    MSB con  $8000
    '***************************** RF COMMUNICATION ********************
    
    ADCON1=7
    CMCON=7
    TRISA.0 = 1         ' These lines of code setup my RF Button Link
    TRISA.1 = 1
    TRISA.2 = 1
    TRISA.3 = 1
    TRISA.4 = 1
    
    Symbol Center  = PORTA.0 
    symbol UP      = PORTA.1       
    symbol Right   = PORTA.2
    Symbol Down    = PORTA.3  
    symbol Left    = PORTA.4 
    
    '****************************************************************
    
    pause 1000
    
    serout2 PORTC.0,84,[$55]      ' uOLED Initialize
    
    '****************************************************************
    
    symbol PinClk  = portc.4
    Symbol PinData = portc.5
    SYMBOL Pwrled  = PORTB.2
    
    TheFile var word
    x var byte
    
    '****************************************************************
    high pwrled
    Pause 2000
    
    Main:
    if center = 1 then play_headshot
    goto main
    
    play_Headshot:
    if center = 1 then play_Headshot
    pause 10             
    thefile = 0000
    gosub SendData
    pause 2000
    goto main
    
    SendData:
    high pinclk
    pause 300
    low pinclk
    pause 2
    
    for x = 0 to 15
    low pinclk
    if (thefile & MSB) then
       high pindata
    else
        low pindata
    endif
    thefile = thefile << 1
    pauseus 200
    high pinclk
    pauseus 200
    next x
    low pindata
    high pinclk
    return


  2. #2
    Join Date
    Sep 2008
    Location
    Maine, USA
    Posts
    59

    Default Re: Playing sound files from 4dSystems SOMO Module

    Gary,
    Thanks for posting this. I was struggling with getting commands to work - I was using SHIFTOUT, then I noticed how SLOOOW the SOMO is and found your post. Your bit bash shift out routine saved me some time. I was able to adapt it for sending volume commands as well.
    "Do or do not, there is no try" Yoda

  3. #3
    gopalji123's Avatar
    gopalji123 Guest

    Default Re: Playing sound files from 4dSystems SOMO Module

    Gary,
    Thanks for posting this. I was struggling with getting commands to work - I was using SHIFTOUT, then I noticed how SLOOOW the SOMO is and found your post. Your bit bash shift out routine saved me some time. I was able to adapt it for sending volume commands a

Members who have read this thread : 3

You do not have permission to view the list of names.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts