This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version.

This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA*/

This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version.

This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA*/

There are many opcodes you can send to the chipcorder in order to let it perform some task. For example, to play the current pointed recording, you can send a PLAY opcode. Using the library above, you do this simply by including the following code into your sketch:

Hey, Thanks for your explanation. But how if i'm not using Arduino instead I use PIC from Microchip with C programming? Is there any problem? Which part should I edit? Your this library for ISD1700 family is function as to record multiple sound and randomly playback it when it is selected?

I'm afraid I cannot be much of help porting the library code to the Microchip PIC platform, since there is a lot of Arduino language embedded into it.

However, I can help you a bit with the differences between platforms.

According to some references I've found hanging low on the internet, PIC's SSPCONx, SSPSTAT and SSPBUF registers correspond to ATmega's SPCR, SPSR and SPDR registers, respectively, which hold all bits that deal with the SPI communication.

by the way, the only reason i'm using the SPI library is because Winbond/Nuvoton made the aggravating decision to route ANA-IN by default so you can't record from it. or, i can, but it sounds terrible. (i need to record from an 1/8" computer sound-out.) am i correct that i need to use an SPI command to change routing?

from the datasheet it looks i need to change APC register to 0100 0000 1000, or 0x408 (record ANA-IN, with monitoring). so in this library - once i get it working - is the following correct?

jesus jiminy! it turned out to be a bug in NG board with LED on pin 13 interfering with hardware SPI. i did the fix pictured here http://www.eng.uah.edu/~jdw/avr/arduino_r13_mod.jpg and it works!

also did [font=Courier]chip.wr_apc1(0x408); // B10000001000[/font] and that seemed to work.

however, i still have some questions.

when i play a sound and then send stop() in the middle, the sound stops but i get CMD_ERR PU Not_RDY. why is that?

fwd() only works if sound is stopped first, otherwise you get CMD_ERR PU Not_RDY. it works in pushbutton mode - is that an SPI thing, or is something wrong?

in pushbutton mode, you need FT active (low) to record ANA-IN. the audio is clear and loud until you start recording, but then the audio monitor is turned off despite the change to apc. unless i am not understanding something correctly, i thought D4 monitor bit set to 1 enables audible preview *while* recording.

the recorded audio is much lower volume than the feed-through monitor. it's also much noisier. the noise is a big issue, i've added decoupling caps everywhere but still trying to figure out how to follow recommendations for separating all the power and ground on a breadboard.

the speaker noise when FT is left active (low) but nothing connected to ANA-IN is very, very noisy. i was hoping to install this somewhere and be able to record new sounds on site by plugging into a jack and hitting record button. but it looks like i will need to keep FT off, so will have to add another external switch? or is something wrong with my circuit if i hear this noise?