It is possible and I've done it ! But I can not give you the software for contractual reasons.
Recording steps are:
1. amplify the microphone signal to be about 80% of VCC peak to peak. Center it at half VCC. Ideally, roll of the frequency response above 4KHz.
2. connect it to the ADC input and select a sampling rate as high as possible, 4K/s will give recognizable speech but faster is better.
3. Use interrupts to signal when the ADC conversion is completed. As soon as it is, save the ADC value to a register and start the ADC running again.
4. in the time while the next conversion is taking place, save the register to RAM. External is best if you want long recordings but internal is OK if there is enough. You need as much RAM per second of recording as the sample rate.
5. go back to step 3 until the end of the recoding.
To play back:
1. use a timer to generate the same duration as your sampling rate.
2. pick up one sample per timer period from the RAM.
3. convert the sample data back to analog.
4. go back to step 2 until the end of the recording.
For the digital to analog conversion you can use an external DAC, an R-2R resistor network on one of the ports or PWM. I use PWM because it uses fewer components, Just set the PWM rate to be at least twice the sampling rate and use each sample in turn to set the m/s period.
You will need a fast PIC, I use 18F46J11 devices clocked at 18.432MHz. They have sufficient internal RAM to hold about 5 seconds of speech.
Brian.