Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.
|
Forum Index : Microcontroller and PC projects : Sound file player module for $3.50...
Author | Message | ||||
Grogster Admin Group Joined: 31/12/2012 Location: New ZealandPosts: 9308 |
These are SOMO clones - they use the same chip that the 4D systems module uses. Price is just too good to ignore. I will dig out my SOMO and have a play with it in advance. There is some PICAXE code I had, developed by myself and other members on the PICAXE forums a few years back, so I should have a go at porting that to the MicroMite... The module does not use MP3, it is AD4 or WAV format, and the uSD card MUST be less then 2GB, preferably 1GB or less, but for embedding sound in a project, that is more then enough storage and low capacity cards can be had on eBay for only a few dollars. U-Disk Audio Player This module does not use SPI/I2C or serial to talk to it, you have to bit-bang the data to the module using two pins(DTA and CLK) There was lots and lots of work done on this module on the PICAXE forums - I will see if I can find a link, as it may well save reposting a lot of the same things here. BUT - it will be a nice project for me, for the MicroMite chip, and as these modules are so cheap, it may well appeal to others too. Found the PICAXE code: 'SOMO sound module controller interface 'Version: 2A - [29/11/2009] Original code ' 3A - [28/12/2009] Pre-requisite changed to <SOMO> 'CHIP: 14M PICAXE, Firmware version 9D or higher - won't work on 9B firmware. ' ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ '---------------- 'PIN ASSIGNMENTS: '---------------- 'INPUT0 used for serial command input 'INPUT1,2,3 not used 'INPUT4 used for busy signal from SOMO module 'OUTPUT0 not used 'OUTPUT1 used for SOMO control(clock line) 'OUTPUT2 used for SOMO control(data line) 'OUTPUT3 used for SOMO control(reset line) 'OUTPUT4 used for 'Syntax Error' LED(not always used) 'OUTPUT5 used for piezo sounder(short beep for command acknowledge) symbol control=b0 'Used for control bits - don't use for anything else symbol dta=w6 'Data to module is a word(16-bit) value symbol x=b5 '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=2 'Serial data output is on pin2 symbol scl=1 'Serial clock output is on pin1 init: high scl 'Set clock idle state high low sda 'Set data idle state low wait 3 gosub piezo 'dta=$015F 'gosub shiftout high scl low sda start: serin 0,N1200,("<SOMO>"),b1,b2,b3,b4'Pre-requisite bytes + command bytes gosub piezo 'Sound piezo buzzer b13 = b1 * 16 + b2 b12 = b3 * 16 + b4 gosub shiftout high scl 'Set clock-line idle-high low sda 'Set data-line idle-low goto start 'Loop to start if no valid command byte '================================ 'CLOCK DATA TO MODULE SUBROUTINE: '================================ shiftout: gosub rst 'Reset module first low scl 'Pull clock-line low pause 2 '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,20 '100uS minimum pulse-width for clock or data lines dta = dta * 2 skippulse: next x 'End of shiftout code high scl 'Pull clock-line high pause 2 'End-bit time return rst: low 3 'Reset module pause 5 'Reset pulse-width as per manual ver 3.0 high 3 '"Release" reset pause 300 'Reset to first bit wait time as per manual ver 3.0 return '======================= 'BEEP PIEZO SUB-ROUTINE: '======================= piezo: high 5 'Turn on piezo beeper pause 150 'Wait some time low 5 'Turn off piezo beeper return I will have a go at porting this to the MicroMite - for $6, you could have a music file playback device. $3 for the module, $3 for the MicroMite chip, which acts as a serial(in this case, but MOBI would want I2C!) interpreter and controller for the actual module itself. Smoke makes things work. When the smoke gets out, it stops! |
||||
Grogster Admin Group Joined: 31/12/2012 Location: New ZealandPosts: 9308 |
I have the PDF for the WTV020 chip, but it is too big to upload here, so if anyone wants it, please PM me with your email address, and I will zap it too you. Smoke makes things work. When the smoke gets out, it stops! |
||||
Print this page |