hi,
can anyone help me to do a program using strcmp?
below is my coding that already succes.
but when i burned to pic,the program didn't work as i want..
Quote:
unsigned short i[68];
//char input[77];
int ptr;
char in[]="$";
void main()
{
Usart_Init(4800);
// in = "$";
do {
if (Usart_Data_Ready()) // If data is received
{
i[68] = Usart_Read(); // Read the received data
ptr = strcmp(i, in);
if (ptr == 0)
{ Usart_Write('Y'); } // Send data via USART
else
{ Usart_Write ('N');}
}
} while (1);
}
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
Posted: Fri Mar 28, 2008 1:26 am
That's not CCS code. It's mikroC code. You should ask your question on
their forum:
http://www.mikroe.com/forum/
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum