westaust55
Moderator
SOMO 14D is working correctly
well pulled out my SOMO 14D module, found a speaker (8 Ohm 3 Watt) and hooked up to a PICAXE 18X.
Downloaded the zip file from the 4D Systems website to have quick access to some AD4 files. Then ran the code already tried by Grogster upon which we have all been working.
Only change was different IO pin assignments (see below)
dta = $0001 gives me the first tune,
dta = $0002 thru $0004 gives me some speech extracts
dta = $0005 is another fine.
Will now proceed to convert a range of mp3 files and test a little more thoroughly.
Had a giggle at 4D Systems 0001.ad4 file which says (roughly):
" Hello World. This is 4D Systems. You are using the SOMO 14D module.
Please make sure that you have connected your SOMO 14D module as shown in the connection diagram . . ."
Bit like those instruction manual that once you have ripped open the box and pulled out the goodies, the instruction manual states:
" please read these instructions on how to unpack your equipment"
EDIT:
further information:
1. I am running the SOMO 14D module at 3.3V
2. tried minimising the delays: reduced the PAUSE 3 to PAUSE 2 and the PULSEOUT from 30 to 20 and still works okay
well pulled out my SOMO 14D module, found a speaker (8 Ohm 3 Watt) and hooked up to a PICAXE 18X.
Downloaded the zip file from the 4D Systems website to have quick access to some AD4 files. Then ran the code already tried by Grogster upon which we have all been working.
Only change was different IO pin assignments (see below)
dta = $0001 gives me the first tune,
dta = $0002 thru $0004 gives me some speech extracts
dta = $0005 is another fine.
Code:
SYMBOL control = b0 ; used for control bits - DONT use for anything else
symbol dta = w6 'Data to module is a word(16-bit) value
symbol x = b3 'X marks the spot...
symbol mask = bit0 'Mask word for the shiftout proceedure
symbol MSB = $8000 'Most Significant Bit position is bit 16
symbol sda =3 'Serial data output is on pin2
symbol scl =2 'Serial clock output is on pin1
symbol busy =2 'Busy line back from SOMO 14D - not used as yet
init:
high scl 'Set clock idle state high
low sda 'Set data idle state low
wait 5 'Allow everything to start before sending any commands
start: 'Test routine - select file 0001.ad4 and start playback
dta = $0001 'Select file # 0001.ad4 from micro-SD card
gosub shiftout 'Tell that to the module
high scl 'Set clock-line idle-state high
low sda
end
'================================
'CLOCK DATA TO MODULE SUBROUTINE:
'================================
shiftout:
low scl 'Pull clock-line low
pause 3 'Start-bit time
for x = 1 to 16 'Start of shiftout code
mask = dta AND MSB / MSB
low sda
if mask = 0 then skipMSB
high sda
skipMSB:
if x = 16 then skippulse
pulsout scl,30
dta = dta * 2
skippulse:
next x 'End of shiftout code
high scl 'Pull clock-line high
pause 3 'End-bit time
return
Will now proceed to convert a range of mp3 files and test a little more thoroughly.
Had a giggle at 4D Systems 0001.ad4 file which says (roughly):
" Hello World. This is 4D Systems. You are using the SOMO 14D module.
Please make sure that you have connected your SOMO 14D module as shown in the connection diagram . . ."
Bit like those instruction manual that once you have ripped open the box and pulled out the goodies, the instruction manual states:
" please read these instructions on how to unpack your equipment"
EDIT:
further information:
1. I am running the SOMO 14D module at 3.3V
2. tried minimising the delays: reduced the PAUSE 3 to PAUSE 2 and the PULSEOUT from 30 to 20 and still works okay
Last edited: