SOMO-14D and Picaxe

piclt

Member
I bought a SOMO-14D about 6 weeks ago and it worked for about 5 minutes in pushbutton mode and then would not do anything. I just thought I had "blown it" somehow ???? and had almost given up when I noticed that users on this forum were also having problems.
Power supplies, SD cards, etc etc. Thanks to all who contributed to the previous threads I have it working again in serial mode and pushbutton mode. I have it working with a 08M using a modified program posted by "goom" to test if it would play the 6 demo files.
=============================
setfreq m8 ;make it run faster
; for picaxe 08m send data out pin1 and clock pin0 filenames for somo14d audio chip
; plays the six demo files
high 0 'make sure clock line is high initially (idles high)

;send volume control....vol = 5
W0=%1111111111110101 'The 16 bit data to send
gosub Send_Data1

sagain:
for b7 = 1 to 6 ; loop thro each file
if b7 = 1 then let W0=%0000000000000000
endif
if b7 = 2 then let W0=%0000000000000001
endif
if b7 = 3 then let W0=%0000000000000010
endif
if b7 = 4 then let W0=%0000000000000011
endif
if b7 = 5 then let W0=%0000000000000100
endif
if b7 = 6 then let W0=%0000000000000101
endif
gosub Send_Data1 ; send the filename
next b7 ; get next file to see how quick it is a switching

pause 10000 ;play last file for a few seconds
goto sagain


Send_Data1:
low 0

for b4=1 to 15 'Loop 15 of the bits

if bit15 = 1 then high 1
endif
if bit15 = 0 then low 1
endif

pulsout 0,40 ;Clock high for 200us to latch data on pin1

W0=W0*2 'Shift left to get next significant bit
next b4

if bit15 = 1 then high 1
endif
if bit15 = 0 then low 1
endif
high 0 ;latch in 16th bit and idle high
pause 10000 ;play for a few seconds
return

end

================================

Also regarding SD Cards, the one I use is Fujifilm 2GB Micro SDcard, formatted FAT16 and works OK.
I have difficulty getting it to work on battery power, I have it and the 08M powered on a Uniross Model Uni505R Multi Output PSU set for 3 volt and voltage measures 3.1 volts.
The only connections are Data, Clk, Speaker and Power, no resistors or diodes ???

The application I have for it, I want it to switch as fast as possible "cleanly" between the files. I will work on that now.
I thought the above might be of interest to those who are still having problems
.............................
 

westaust55

Moderator
Great to see that you have your SOMO 14D module working.

Thanks for taking the time to indicate your experiences and what uSD card has worked for you.

I will add the details for the uSD card you have used with success to the "Getting Started thread"
http://www.picaxeforum.co.uk/showthread.php?t=13971
to keep the information together for the benefit of all.


With respoect to resistors and diodes, the use of resitors between the PICAXE chip and SOMO 14D module is really only essential on the PICAXE outputs WHEN the PICAXE is operating at a higher voltage (eg 4.5V or 5V) than the SOMO 14D (3/3.3V)
 
Last edited:

piclt

Member
Somo14D Speed

I tried to see how fast it would switch between sound files.
With setfreq = m8 I was able to change to pulseout 0,20 and worked.
Acording to simulating on VSM the start low is only 0.5 ms and clock pulse (pulseout) is 0.25 ms also 0.5 ms between clock pulses approx, takes about 12.5 ms to input 16 bits.
If I try to send another filename imediately it locks up. I have to play at least approx 600 ms of the current sound file before sending another file name. I did this by reducing the Pause 10000 at the bottom of the program. The minimum value that it will work with is Pause 1200 approx.
While the chip is very good at playing songs etc it looks like it wont be any good at playing short sounds that would be activated by events happening in quick succession.
eg. gunshot or automatic gunfire, banging objects etc

Regards

PICLT
 

westaust55

Moderator
Hi PicIt,

seems that you may have identified another timing constraint wrt min time after starting one audio sample before you can interrupt with another audio sample.

The code I have been using is a little different to that you use but will play with the code to initiate a new song immediately after the first song is played and see if my experience is the same as you mention.

I cannot myself however currently envisage playing audio samples of less than 0.6 seconds duration.
 
to piclt re somo-14 and the 08M

hi there i like simple programs like yours seems it will do just about what i wanted to do. Question You say you are using a 08M please could you tell me what pins are conected to what pins on the 14d

regards Andy Quirot
 
Top