I've googled a lot without any luck. I'm new to SPI programming and I was wondering if someone had an example of code controlling an ISD4004 sound recording chip. I programmed my own but all I get is clicks when the recording and playback starts and stops.
From reading the specsheet I can't figure out in what order to send the commands. The spec sheet is here: http://www.nuvoton.com/hq/enu/ProductAndSales/ProductLines/ConsumerElectronicsIC/ISDVoiceIC/ISDChipCorder/Documents/ISD4004.pdf
For example, I'm telling it to playback from address 0x0 this way:
...
const byte POWERUP = B00100000;
const byte SETREC = B10100000;
const byte REC = B10110000;
const byte SETPLAY = B11100000;
const byte PLAY = B11110000;
const byte STOP = B00110000;
const byte ADDRESSZERO = 0x0;
...
int startPlay() {
// select ISD4004
digitalWrite(slaveSelectPin,LOW);
// send address and value
SPI.transfer(SETPLAY);
SPI.transfer(ADDRESSZERO);
SPI.transfer(ADDRESSZERO);
SPI.transfer(PLAY);
// deselect ISD4004
digitalWrite(slaveSelectPin,HIGH);
}
Does this make sense?
I'll appreciate any help.