luckyluke
Joined: 18 Apr 2006 Posts: 45
|
isd4003 problem |
Posted: Wed Dec 26, 2007 4:11 pm |
|
|
i used isd4003-5min and ccs driver several months ago and recording playing was perfect but now with the same circuit and same code they dont i tried two other isd chips which are 8min not a sound
problem is i think isd chip doesnt start to work whenever i stop current operation returning address is always "0"
any suggestion please
Driver:
Code: |
#ifndef ISD4003_SELECT
#define ISD4003_RAC PIN_C3
#define ISD4003_SELECT PIN_d0
#define ISD4003_CLK PIN_d1
#define ISD4003_MOSI PIN_C5
#define ISD4003_MISO PIN_C4
#endif
|
Code:
Code: |
#include <18F452.h>
#device ICD=TRUE
#fuses XT,NOWDT,PUT,NOPROTECT,BROWNOUT,NOLVP
#use delay(clock=4000000)
#include <flex_lcd.c>
#include <isd4003.c>
void main()
{
long last_address=0;
int cndt=0;
init_isd();
lcd_init();
delay_ms(100);
output_high(pin_c7);//lcd backlight
stop_message();
delay_ms(250);
printf(lcd_putc,"\fStarting...\n");
while(1){
delay_ms(150);
if(!input(pin_b0)){
last_address = stop_message()+1;
delay_ms(200);
cndt=0;
printf(lcd_putc,"\fcndt:%u stopped \nAddress: %lu \n",cndt,last_address);
delay_ms(250);
}
if(!input(pin_b1)){
if(cndt==0){
play_message(10);
cndt=1;
printf(lcd_putc,"\fcndt:%u \nPlaying ",cndt);
delay_ms(250);}}
if(!input(pin_b2)){
if(cndt==0){
record_message(10);
cndt=2;
printf(lcd_putc,"\fcndt: %u \nRecording",cndt);
delay_ms(250);}}
}} |
V4.57 |
|