Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Programming ISD2548 in C

Status
Not open for further replies.

summersnow

Newbie level 6
Newbie level 6
Joined
Dec 30, 2006
Messages
14
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,435
Hi all,

Is there anyone who have an experience on writing a source code to play a message of ISD 2548 chip? Actually i tried to write a source code in C and using a PIC to play the message.The mode i use is the addressing mode.I didn't use the operational mode because I'm using the addressing mode to record the message into the speech IC.When i manually giving instruction to the speech IC to play the message,it play nicely and end when there is an eom markers. However,when i tried to play it using the PIC, it keep on looping nonstop when i followed the data sheet of the ISD chip.This is the code that i write in C and the result is the ISD chip keep on playing the same message.

#include <p18f452.h>

#define PD PORTDbits.RD5
#define CE PORTDbits.RD4
#define A7 PORTDbits.RD7
#define A8 PORTDbits.RD6

void main(void)
{
Initial();
message1();
message2();
message3();
}

void Initial()
{
TRISD = 0b00000000;
TRISB = 0b00000000;

}

void message1()
{
PD=1;
PD=0;
PORTB = 0b00000000; //message1
A7=0;
A8=0;
CE=1;
delay(10);
CE=0;
delay(1000);
PD=1;
}

void message2()
{
PD=1;
PD=0;
PORTB = 0b11000100; //message2
A7=0;
A8=0;
CE=1;
delay(10);
CE=0;
delay(1000);
PD=1;
}

void message3()
{
PD=1;
PD=0;
PORTB = 0b00001100; //message3
A7=0;
A8=0;
CE=1;
delay(10);
CE=0;
delay(1000);
PD=1;
}


After modifying the program,finally i manage to play a single message each time when there is an EOM marker. However,the program can't play more than 2 message at one time. The speech IC chip will only play the first two message and stop or sometimes it will play the first and the third message.This is the source code i wrote.

#include <p18f452.h>

#define PD PORTDbits.RD5
#define CE PORTDbits.RD4
#define A7 PORTDbits.RD7
#define A8 PORTDbits.RD6

void main(void)
{
Initial();
message1();
message2();
message3();
}

void Initial()
{
TRISD = 0b00000000;
TRISB = 0b00000000;

}

void message1()
{
PORTB = 0b00000000; //message1
A7=0;
A8=0;
CE=0;
CE=1;
PD=0;
delay(1000);
}

void message2()
{
PORTB = 0b11000100; //message2
A7=0;
A8=0;
CE=0;
CE=1;
PD=0;
delay(1000);
}

void message3()
{
PORTB = 0b00001100; //message3
A7=0;
A8=0;
CE=0;
CE=1;
PD=0;
delay(1000);
}


I really have no idea how to continue. Please help me to solve this problem.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top