Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Need help ISD4002

Status
Not open for further replies.

zeeshan1978

New Member
Hi friends,

This is the first time i am writting here for your support and help about Chipcorder ISD4002.

I am making a project where i need to playback some recorded messages using ISD4002 IC.

I am using ATMEGA8 Microcontroller and connected the ISD4002 with the Microcontroller. The Play stop and Record commands are working fine and it is also reading the current pointer address too.

But when i record something it does not record and only play blank sound and only record blank.

Could you please provide me how icould cnnect my PC to input Wav file directly into ISD or using Microcontroller or what is the shematic to use Microphone.

regards,
Shan
 
Hi,
I bought one and tried to run it, but still cannot work
Worse, actually i dont know how to debug it
Following is my code in Mikro C for recording
Code:
void main()
{
     ADCON1=0x06;  //RA5 Digital I/O
     TRISA=0x20;   //!RA5=SS: output for Chip Select
     TRISC=0x10;   //RC5:output SDO
                   //RC4: Input SDI
                   //RC3:output SCK
     Spi_Init();
     PORTA.F5=0; //!SS=0 chip enabled

     Spi_Write(0x20);   // Power up
     Spi_Write(0x00);
     Delay_ms(25);      //Tpud

     Spi_Write(0x20);   //Power  up
     Spi_Write(0x00);
     Delay_ms(50);      //2 x Tpud
     
     Spi_Write(0xB0);   //SETREC from location 0x00
     Spi_Write(0x00);
     
     Delay_ms(10000);   //delay 10s for recording
     
     Spi_Write(0x30);   //STOP
     Spi_Write(0x00);
     
     Delay_ms(50);      //Tstop;
}
**broken link removed**

**broken link removed**

This is not my first time doing PIC and C. I have basic background using C for PIC16f877 (just some basic stuffs like keypad, LCD...)
The mikro C has built-in functions for SPI.
Actually, there is one thing I confused:
pin RA5/!SS/AN4 is used to select ISD4002--> it should be an digital output pin. But in datasheet, section9.1, it says that we have to set TRISA<5> which means RA5/!SS/AN4 will be a digital input.
 
Last edited:
Hello friend,

I think it is very long time i find finally how to work with the ISD4002. I am using BASCOM and it is working fine with me and i used in my project perfectly. If you need any help with BASCOM just write me back.

Regards,
Shan
 
Hi Shan,

Thanks a lot.
Could you please send me any materials of your project you keep. Although our projects are not very similar but I believe I can learn something from you
Thanks
 
Actually, there is one thing I confused:
pin RA5/!SS/AN4 is used to select ISD4002--> it should be an digital output pin. But in datasheet, section9.1, it says that we have to set TRISA<5> which means RA5/!SS/AN4 will be a digital input.

The RA5 pin should only be an input when the Pic is a slave, in this application the Pic is the master and so should control the slave select pin and RA5 should be an output.

Mike.
 
The RA5 pin should only be an input when the Pic is a slave, in this application the Pic is the master and so should control the slave select pin and RA5 should be an output.

Mike.
I've just changed. Still cannot work!
At least I think I should have something :D
 
* What is your background? Do you know C or understand the PIC you are using?
I have basic background in programming C for PIC such as LCD, Keypad, UART...
* Is this your first micro contoller project?
Yes, it's my first project but not my project includes many small features
* Do you have a debugger (ICD2 or PICkit2) that will allow you to step through the code. What is your programming setup?
I don't think I have such a thing. I use Mikro C to program and compile source code to .hex file, then use Winpic800 as Programmer
* Can you verify that the SPI interface between the uC and isd4002 is working?
No
* You will need to post all the code including the SPI code.
I used the built-in functions in Mikro C for SPI
 
Last edited:
Hello Leejongfang,

I am very sorry i have been very busy and some problem with the internet and i could not connected here. I hope you have worked out with your chipcoder isd4002 but if you need anything in this regard, please write me my project is complete with the bascom.

Regards,
shan
 
Hello, I have a problem with ISD4002.
My circuit is like this:
**broken link removed**

And this is my software:
Code:
#include <16F84A.h>

#FUSES NOWDT                    //No Watch Dog Timer
#FUSES XT                       //Crystal osc <= 4mhz for PCM/PCH , 3mhz to 10 mhz for PCD
#FUSES NOPUT                    //No Power Up Timer
#FUSES NOPROTECT                //Code not protected from reading

#use delay(clock=4000000)
#use rs232(baud=9600,parity=N,xmit=PIN_A0,rcv=PIN_A1,bits=8)

#byte PORTA=0x05
#byte PORTB=0x06

#bit  CS          = PORTB.7
#bit  SCLK        = PORTB.4
#bit  MOSI        = PORTB.5
#bit  MISO        = PORTB.2

#define POWERUP   0b00100
#define SETREC    0b10100
#define SETPLAY   0b11100
#define REC       0b10110
#define PLAY      0b11110

#define STOP      0b00110
#define STOPSLEEP 0b00010

#define TPUD      28
#define Duracion  2000
#define DIR       0


void envia (int8 comando, int8 direccion) {
   int i=0;
   int16 word;
   int16 word_recibida=0;
   word = ((int16)comando<<11) + (int16)direccion;
   CS=0;   
   for (i=0; i<16; i++) {
      MOSI = bit_test(word,i);
      SCLK=1;
      delay_us(1);
      if (MISO)
         bit_set(word_recibida,i);
      SCLK=0;
   }
   CS=1;
   printf ("%LX ",word_recibida);
}

void Reproducir() {
   envia (POWERUP,DIR);
   delay_ms(TPUD);
   envia (SETPLAY,DIR);
   envia (PLAY,DIR);
   delay_ms(Duracion);
   envia (STOPSLEEP,DIR);
}

void Grabar() {
   envia (POWERUP,DIR);
   delay_ms(TPUD);
   envia (POWERUP,DIR);
   delay_ms(TPUD);
   delay_ms(TPUD);
   envia (SETREC,DIR);
   envia (REC,DIR);
   delay_ms(Duracion);
   envia (STOP,DIR);
}



void main()
{
   char c;

   setup_timer_0(RTCC_INTERNAL|RTCC_DIV_1);
   set_tris_b(0x4f);
   CS=1;
   SCLK=0;
   
   // TODO: USER CODE!!
   printf ("Grabador ISD4002\n\r\n\r> ");
   while (1) {
      if (kbhit()) {
         c=getch();
         switch (c) {
            case 'g':
               printf ("Grabando ");
               Grabar();
               break;
            case 'r':
               printf ("Reproduciendo ");
               Reproducir();
               break; 
         }
         printf ("\n\r> ");
      }
   }

}

The ISD4002 responds to the commands, because I can hear noise in the output when run the recording and playback commands. But does not record the sound you put in the entrance, only noise is heard.

Can you help me?
Thanks
 
Hello my friend
The project I'm making a calculator for blind people using IC ISD4002 is the way I connect the IC to the microcontroller and guidance on how to make my program.
Thanks
 
Status
Not open for further replies.

Latest threads

Back
Top