This project uses a ISD4004 voice recorder chip, with a PIC 16c84 controlling it via SPI, to give 8 minutes of voice quality recording and playback. I decided to keep the design simple - with just 2 buttons: one to record whatever audio is coming into the chip and a second button to play it all back.

The chip in question has many more functions than I am using - including the ability to make multiple recordings and address each one individually. However, for my particular application, one message was enough. I also used this project to try out some ideas for getting more information from flashing LEDs - there's a separate article about that: this bit is about the speech recorder.
I also used this project as a toe in the water for SPI programming. Since the 16c84 does not have a dedicated SPI interface, I wrote my own in C. For this piece of work, the speed of the interface was not important - I was also running the PIC well below it's operational frequency as a means to reduce the possibility of electrical noise induced into the ISD's audio input.
Since the ISD4004 runs at 3Volts, I decided to run the 16c84 at this voltage, too. The alternative was to run the PIC at 5Volts and then drop the voltage on the SPI pins down, so the ISD4004 wasn't being over-driven, That seemed too complicated. Since the 16c84 is good down to 2V the decision was quite easy. The only complication was that I didn't have any 3Volt regulators. The solution I came up with was to use an ordinary 7805 and insert three diodes in series with the output. Each didoe drops about 0.6V depending on it's individual characteristics, the load current, temperature and (maybe) the phase of the moon. So long as the PIC was operational and a nice, bright red LED was across the supply to provide a basic load of about 20mA, I got a supply voltage of about 2.85V - good enough.
The circuit diagram shows a fairly straightforward design. Apart from the two I.C.s there are a couple of push buttons, an RC timing for the microprocessor - giving a clock speed of about 650kHz, some LEDs and associated resistors (two of which are run in a charlieplexed configuration, so they only require a single pin - not that PIC pins were scarce, there are 4 unused, I just wanted to experiment with the method. The support circuitry for the ISD4004 is also quite simple, straight out of the datasheet: some decoupling and D.C. blocking capacitors and a little care about routing analog and digital ground wires.
The photo shows that the device was built on a piece of matrix board (no copper strips). It also shows that the ISD4004 is a SOIC, surface mount device, with "pins" spaced at 1.27mm intervals. I normally dislike using SMD format and will avoid magazine articles and projects that require them - mainly because of the difficulty of soldering them neatly onto PCBs. However, since this was my own build, not a kit, I was using a wiring pen and solder-through wire (don't lean over this while soldering - the fumes are acrid) I reckoned that the pin spacing was wide enough to work with reliably. To this end, I used a dab of hot-melt glue to attach the SMD to the top of the matrix board, then threaded wires through the holes and ran all the wires on the underside of the board - just as if the device had been a through-hole I.C.
Although the scale is too small to achieve a neat soldering job, the joints were strong enough to survive a "tug" test on the wires, and by fitting two through some holes, the result was neat enough.
Software
This was written exclusively in HiTech C for the 16c84, using their free compiler. Considering this processor only contains 36 bytes of RAM, there were some constraints - although I did add functions and features beyond the basics, since I saw little point in leaving program memory unused. In the end I had 1 byte of RAM free and about 30 bytes of EEPROM program memory unused. The source is available here for your amusement, education, and use. It's reasonably well commented and the source file is self-contained. You should get a copy of the ISD4004 datasheet for an explanation of how to talk to this device.
There are three main parts to the code: the main processing loop, an interrupt routine to handle timing and some asynchronous events from the ISD4004 and the SPI routines, which send commands and receive back some status information.
The main loop polls the pushbuttons every 100mSec, decides which one(s) have been pressed and released and takes the appropriate action - to either start or stop a recording or playback. Each button toggles it's respective function: so pressing the PLAY button once initiates a playback. Press it again while playing and the playback will stop. Leave the device idle for a few seconds and the main loop will put the ISD4004 into its powered-down mode. I decided to do this as I was getting a very loud audio "squeal" when the device was turned off with the ISD4004 still active. It may also help prevent the stored recording getting corrupted.
The interrupt routine fires once every 1mSec (approximately, due to the inherent inaccuracy of the R-C based clock) and generally keeps track of time. It is also responsible for flashing the LEDs every 1/10 seconds, and implementing some millisecond delays needed to power-up and down the iSD4004. There are a couple of handlers for the INT signal from the ISD4004 (when it hits the end of the playing message, or fills it's memory capacity during recording) and the Row counter, which the ISD4004 "ticks" every 200 mSec. The row counter, along with increasing the duty cycle of one of the LEDs acts as an indication of how much more recording (or playback) time there is left.
Finally there are the SPI routines. These turn out to quite simple - as all the commands to the ISD4004 follow the same format and are all 3 bytes long. The 16c84 acts as the SPI master and therefore asserts the Slave select (SS) line to logic 0 before sending a command. It also generates the Clock train and transmits to the ISD4004 on the rising edge of each cycle, while reading data back from the ISD4004 on the falling edge. The only really useful data sent back by the ISD4004 is whether it has reached an End of Message or Over Run state during playback or recording, respectively. These states, when detected, are indicated by changing the flashing pattern of the LEDs.
Although I've been calling this project a Speech Recorder, that isn't my main use for it. It does work well enough with a small electret microphone feeding the audio input (via a 3.3k resistor from the board' supply) and taking output to an audio amplifier. Since the ISD4004 only need 32mV pk-pk input, you have to be careful not to run it into distortion with normal audio levels (hence the small preset, next to the 3.5mm jack in the top picture). It would also be possible to expand the capabilities of the device with more push-buttons for additional functions (such as multiple messages - telephone answering machine style). However, that would mean rewriting or removing some of the existing code to make room in the 16c84. Obviously, if you choose to use a different PIC you can select one with a larger memory. I only used the 16c84 as I still have a tube of them left, which I've been trying to use up for the past 10 years or so - still got about 8 or 9 to go!