Hi Mahesh
I've not used this particular part, but have used the APR48000 and another similar one. The code is in 8051 C, but if it helps, I have attached it here.
Code:
/***********************************************************************\
APR48000 voice record/playback IC routines
\***********************************************************************/
/* Send a command to the APR48000
Cmd is the APR Opcode
Adr is the parameter for the opcode
Send order is Msb-Lsb
First the Cmd (Lower 6 bits), then Adr (Lower 15 bits)
PWRUP (4) (0x2)
REC (9)
PLAY (D)
FWD (3)
STOP (6)
*/
void CommandAPR(byte Cmd, uint Adr) {
byte BitCnt;
Cmd <<= 3;
Adr <<= 1;
APRcs = 0;
for (BitCnt = 0;BitCnt < 5;BitCnt++){
APRdi = Cmd & 0x80;
APRclk = 1;
Cmd = Cmd << 1;
APRclk = 0;
}
for (BitCnt = 0;BitCnt < 15;BitCnt++){
APRdi = Adr & 0x8000;
APRclk = 1;
Adr <<= 1;
APRclk = 0;
}
APRcs = 1;
}
/***********************************************************************\
APR48000 voice record/playback IC routines
\***********************************************************************/
Bookmarks