kevroy
Junior Member level 2
Hi,
I have written a program for an automatic audio record/play. Im designing a repeater which automatically records the message as it comes in, then it (supposed to) triggers the play function on the ISD1790P once the message is done. I have the record function down and working properly. In order to play the message from the ISD, you have to bring the "play" pin to Vss (ground). I need my output (named LED in my code) to drop low after the record function goes from 0 to 1. (ive provided a timing diagram of what i need).
And as a note, the record, erase, and play functions on the ISD1790P are active when the pin is brought to GROUND, not Vcc.
Any questions, please ask me.
Thank you.
**broken link removed**
My code is below.
int main()
{
unsigned int number;
int lowcount = 0;
int count = 0;
setup();
while(1)
{
//Insert Code Here
delayMs(10);
ADCON1bits.SAMP = 0; //start conversion
while(ADCON1bits.DONE == 0){}; //wait for conversion to finish
number = ADCBUF0;
if(number > 15)
{
RECORD = 0;
lowcount = 0;
}
else if(number < 15)
{
RECORD = 0;
lowcount = lowcount + 1;
}
if(lowcount > 80)
{
RECORD = 1;
count = 1;
}
if(RECORD == 1 && count == 1)
{
LED = 0;
count = 0;
}
}
}
I have written a program for an automatic audio record/play. Im designing a repeater which automatically records the message as it comes in, then it (supposed to) triggers the play function on the ISD1790P once the message is done. I have the record function down and working properly. In order to play the message from the ISD, you have to bring the "play" pin to Vss (ground). I need my output (named LED in my code) to drop low after the record function goes from 0 to 1. (ive provided a timing diagram of what i need).
And as a note, the record, erase, and play functions on the ISD1790P are active when the pin is brought to GROUND, not Vcc.
Any questions, please ask me.
Thank you.
**broken link removed**
My code is below.
int main()
{
unsigned int number;
int lowcount = 0;
int count = 0;
setup();
while(1)
{
//Insert Code Here
delayMs(10);
ADCON1bits.SAMP = 0; //start conversion
while(ADCON1bits.DONE == 0){}; //wait for conversion to finish
number = ADCBUF0;
if(number > 15)
{
RECORD = 0;
lowcount = 0;
}
else if(number < 15)
{
RECORD = 0;
lowcount = lowcount + 1;
}
if(lowcount > 80)
{
RECORD = 1;
count = 1;
}
if(RECORD == 1 && count == 1)
{
LED = 0;
count = 0;
}
}
}