Voice My Bot!
Botdocter
Posts: 271
I have this chip laying around;
pdfdata.datasheetsite.com/web/57418/ISD4002-120.pdf
Can anyone tell me if it is 'do-able' to let this work with the propeller?
it can record/play 120 seconds in total and every recording has a unique adress so it can be used by microcontrollers. .....or so i read
any help is welcome.
Thanx in advance!
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
1 Parallax Propeller Robot Control Board
1 Memsic MX2125 accelerometer/ tilt
1 Parallax Ping))) ultrasonic sensor
a few motors and a whole lot of chaos!
pdfdata.datasheetsite.com/web/57418/ISD4002-120.pdf
Can anyone tell me if it is 'do-able' to let this work with the propeller?
it can record/play 120 seconds in total and every recording has a unique adress so it can be used by microcontrollers. .....or so i read
any help is welcome.
Thanx in advance!
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
1 Parallax Propeller Robot Control Board
1 Memsic MX2125 accelerometer/ tilt
1 Parallax Ping))) ultrasonic sensor
a few motors and a whole lot of chaos!
Comments
The question is "how much do you know?". The datasheet gives sample circuits which should work. It describes the layout of the information needed to control the device. Can you take some of the SPI examples for the Propeller and modify them to work with this device? It shouldn't be hard, but it's not a beginner's project.
So i will probably need some help with the code. I'll make the connections first and will return then
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
1 Parallax Propeller Robot Control Board
1 Memsic MX2125 accelerometer/ tilt
1 Parallax Ping))) ultrasonic sensor
a few motors and a whole lot of chaos!
I'm not sure why but it forgets things when I record more than one
and turn it off and on again. Maybe I'm overloading the protoboard.
Anyway, I can't upload my program now due to a technical problem,
but Maybe I could type it. It works like this:
Experimentally, I defined each number key as one of the i2c commands
and there's a few to start recording, a few to start playing, one to skip
to the next sound, one to go to the beginning, one to goto the end,
one to sleep, one to powerup, one to powerdown, as I recall.
Skip to next sound was the one that seemed most unreliable to me,
where eventually it just stopped working and I'd have to wait for the
sound to end before playing the next one, and annoying glitches like
that.
That's probably all it was, glitches. If you can read the timing diagrams
on the data sheet and toggle the pins that way in Spin when a key is
pressed, and hook up the ISD chip like the data sheet says, and mind the
difference in voltage between Propeller and ISD chips, it should work.
It seems to me that the ISD chips are 15 years old, and now for around
the same price you can get a complete digital recorder with a lot more
time on it, which can be modified for a project by just wiring into the buttons.
Or you can get a pair of "voice memo keychains" for even less and wire
into their record/play buttons. Then there are talking greeting cards... etc.
edit: I found the ISD2560 and ISD25120 to be Very Much easier to program,
but they are practically both the same chip, with one sampling at 8Khz and
the other at 4Khz (for twice the time but only good for telephone quality
voice). They were capable of being operated with record and play "buttons"
instead of i2c. To choose random sounds though you needed a parallel port.
Post Edited (VIRAND) : 5/4/2010 10:47:09 AM GMT
Mp3 players or voice recorders wont work because i need to play the sounds have to be accesible randomly.
Thank you though...
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
1 Parallax Propeller Robot Control Board
1 Memsic MX2125 accelerometer/ tilt
1 Parallax Ping))) ultrasonic sensor
a few motors and a whole lot of chaos!
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
1 Parallax Propeller Robot Control Board
1 Memsic MX2125 accelerometer/ tilt
1 Parallax Ping))) ultrasonic sensor
a few motors and a whole lot of chaos!
or changing the end of it to the end of all recordings. I think its just a glitch
caused by overloading the voltage regulator on the board though, especially
at bootup (maybe).
Although I think a wavplayer would be a simpler and more modern way to do it
especially IF (because I don't know) the chips maybe no longer in production and
you might want more than one, but also because all the wav objects are already done.
I may be able to post my code soon for ISD400X and I'm sorry that I'm delayed but
glad I happen to have something relevant and moderately significant done in advance.
My code does not bother with addresses, as it only uses the simple commands
necessary to record and playback messages in order. I did not implement any
Read commands, nor address commands, since I was just experimenting with
the chip at the time, for simply taking messages. I put it on the shelf when someone
was annoyed with the repetitive sounds I was making with it, and I forgot about it
before I solved the glitch problem. Thus I think the program is very small and
simple and I'll try to post it soon. ... BTW it uses tv_text.spin object to display the
keyboard keys and what they do, and which ones were pressed while testing,
which is good for trying the chip on a demoboard, but I don't know if the robot
boards have demoboard compatible pin configuration.
I use serial terminal for all my output.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
1 Parallax Propeller Robot Control Board
1 Memsic MX2125 accelerometer/ tilt
1 Parallax Ping))) ultrasonic sensor
a few motors and a whole lot of chaos!
but the part you need is very small and all the rest of the code can be made
into an independent Propeller Chip serial terminal with a serial object and a
keyboard and TV if you like. The ISD driver has a minor read bug but is sufficient
to operate the ISD-4000 series sound chips. I just added lots of comments to help.
I could not attach a spin file, due to the nature of a technical problem.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
I should be typing in Spin now.
Coming soon. My open Propeller Project Pages and favorite links index.
Post Edited (VIRAND) : 5/5/2010 10:04:27 PM GMT
The code did not arrive as sent, which is another typical anomaly of "my problem".
I noticed outa dropped the .
Now editing to see if I can fix that and other issues. FAIL. Corrections:
PUB ISD(pp):qq|rr,jj,kk '***I2C DRIVER FOR ISD-400X SOUND CHIPS
qq:=0 '***Believed to be output only
rr:=1
kk:=pp/2048
outa 0 :=0 'Initial state of i2c bus?
outa 3 :=1 'CE activated?
outa 3 :=0
outa 0 :=0
repeat jj from 0 to 15 'Send command code
qq:=(qq*2)+ina 1 'Receive data from ISD? ***BUG???ina???
' outa 0 :=1 '<<<NOT USED
outa 1 :=(pp&rr)/rr 'BitBang i2c Data Out to ISD
outa 0 :=1
rr:=rr*2
outa 0 :=0
' outa 7 :=(pp&rr)/rr '<<<******REMOVE******
outa 3 :=1 'Final state. CE released?
text.out(pp&255|96) '***Display ("something?") on TERM CONS
'' *NEW COMMENTS on probable or likely pin functions* (unconfirmed)
'' OUTA0 is ... P0 OUT Clock i2c out to ISD SCL
'' OUTA1 is ... P1 OUT Write command to ISD SDA (connected to P2?)
'' INA2 is ... P2 IN Read data from ISD SDA? ***BUG???Not used
'' OUTA3 is ... P3 OUT ChipEnable i2c port of ISD???
Strange failure of all numbers in brackets to post within code?
Post Edited (VIRAND) : 5/5/2010 10:13:26 PM GMT
Months ago I complained about receiving corrupted Spin files,
and I didn't even have this computer then.
I'm guessing the code may have posted correctly, but somehow returns corrupted.
Post Edited (VIRAND) : 5/5/2010 11:10:54 PM GMT
I didn't had the time to look at it yet because my partner de-headed my robot, while waving his legs (dont ask!). But will post when i got to it.
Have an optical mouse sensor coming in in a few days too. It's for navigation. So a lot of programming to be done! Woohoo!!
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
1 Parallax Propeller Robot Control Board
1 Memsic MX2125 accelerometer/ tilt
1 Parallax Ping))) ultrasonic sensor
a few motors and a whole lot of chaos!