currently I made the next circuit
i found in this page http://hem.passagen.se/communication/speach.html
and I find the next firm for the pic
#include <REGX52.H>
#include <string.h>
#include <stdio.h>
#include <absacc.h>
#include <intrins.h>
sbit ss=P1^0;
sbit mosi=P1^1;
sbit sclk=P1^4;
void delay_ms(unsigned int ms)
{
unsigned char i;
while(ms--)
{
i=112;
while(i--);
}
}
void spi_mosi(unsigned char spi_data)
{
unsigned char BitCnt;
mosi=0;
sclk=0;
for(BitCnt=0;BitCnt<8;BitCnt++)
{
sclk=0;
_nop_();
if((spi_data>>BitCnt)&0x01)
mosi=1;
else
mosi=0;
_nop_();
_nop_();
_nop_();
sclk=1;
_nop_();
_nop_();
_nop_();
}
_nop_();
_nop_();
_nop_();
}
void play_isd4002(unsigned int addr)
{
unsigned char addr_l,addr_h;
addr_l=addr;
addr_h=addr>>8;
addr_h=addr_h|0xe0;
ss=0;
spi_mosi(0x20);
ss=1;
delay_ms(50);
ss=0;
spi_mosi(addr_l);
spi_mosi(addr_h);
ss=1;
delay_ms(10);
ss=0;
spi_mosi(0xf0);
ss=1;
}
void stop_isd4002()
{
ss=0;
spi_mosi(0x70);
ss=1;
delay_ms(50);
}
void main()
{
play_isd4002(0x86);
}
but i can't record the file... so I need a correct configuration for the ISD4002 ...thanks
Bookmarks