dEAR
i HAD MADE changes to existing Sci_Echoback.c example project
msg = "\r\n\n\nHello World!\0";
scia_msg(msg);
msg = "\r\nYou will enter a character, and the DSP will echo it back! \n\0";
scia_msg(msg);
for(;;)
{
msg = "\r\nEnter a character: \0";
// msg = "\r\n ";
scia_msg(msg);
// Wait for inc character
while(SciaRegs.SCIFFRX.bit.RXFFST !=1) { } // wait for XRDY =1 for empty state
// Get character
ReceivedChar = SciaRegs.SCIRXBUF.all;
// Echo character back
msg = "You sent: \0";
scia_msg(msg);
scia_xmit(ReceivedChar);
// adc=(int)(ir_grid*100);
adc=(int)(12.45);
ltoa(adc, msg);
scia_msg(msg);
}
The ouput is shown below
Hello World!
You will enter a character, and the DSP will echo it back!
Enter a character: You sent: A12
Enter a character: 12A12
Enter a character: 12A12
Enter a character: 12A12
Why the number 12 is repeated again and why "You sent" is not displayed