Hippy, I've been working with the ISD 4004 audio recorded. It is controlled via the SPI interface on the 40X1. I can controll most of the functions. I know that at least some of comms are working because with my CRO and bench top power supply I can see current consumption go up or down when for example I issue the powerup or powerdown com.
I cannot get the record or play com to work. I believe the problem is in the way Im expressing the address to record to or to play from part of the command. The address is given in hex.
The datat sheet is here:
http://www.chipdip.ru/library/DOC000057135.pdf
Page 6 of the data sheet has the Opcode summary.
Page 62 of the new picaxe basic commands manual has the hspiout command info.
I have pasted in part of the code Im using below. As I say everything seems to be working except the record and play lines. How should I write the hex address part of the code? As it is below is the only way the editor will take it but it doesnt seem to work.
I have discovered it is important to high low chip select output between eachk command.
I've kinda hit the wall, any advice will be much appreciated. If you need more info please ask and I'll respond.
main:
low 0 'enable slave select
init: hspisetup spimode10e,spislow 'spi mode 1,1 the ISD4004 responds to this
high 0
low 0 'enable slave select
hspiout (%00100) 'POWERUP com
high 0
pause 35 'power up delay
low 0
hspiout (%00100) 'POWERUP com
high 0
low 0
hspiout (%10100,$00,$00) 'SETREC com
high 0
low 0
hspiout (%10110) 'REC com
high 0
pause 3000
hspiout (%00110000) 'STOP com
low 0
hspiout (%0001) 'STOPPWRDN com
high 0
stop
 
Edited by - BrendanP on 23/06/2007 09:10:38
Edited by - BrendanP on 23/06/2007 09:15:58
I cannot get the record or play com to work. I believe the problem is in the way Im expressing the address to record to or to play from part of the command. The address is given in hex.
The datat sheet is here:
http://www.chipdip.ru/library/DOC000057135.pdf
Page 6 of the data sheet has the Opcode summary.
Page 62 of the new picaxe basic commands manual has the hspiout command info.
I have pasted in part of the code Im using below. As I say everything seems to be working except the record and play lines. How should I write the hex address part of the code? As it is below is the only way the editor will take it but it doesnt seem to work.
I have discovered it is important to high low chip select output between eachk command.
I've kinda hit the wall, any advice will be much appreciated. If you need more info please ask and I'll respond.
main:
low 0 'enable slave select
init: hspisetup spimode10e,spislow 'spi mode 1,1 the ISD4004 responds to this
high 0
low 0 'enable slave select
hspiout (%00100) 'POWERUP com
high 0
pause 35 'power up delay
low 0
hspiout (%00100) 'POWERUP com
high 0
low 0
hspiout (%10100,$00,$00) 'SETREC com
high 0
low 0
hspiout (%10110) 'REC com
high 0
pause 3000
hspiout (%00110000) 'STOP com
low 0
hspiout (%0001) 'STOPPWRDN com
high 0
stop
 
Edited by - BrendanP on 23/06/2007 09:10:38
Edited by - BrendanP on 23/06/2007 09:15:58