akshaybhavsar
Full Member level 2
Hi,
I am using SIM808 module in my application.My UART is working as i receive byte.SIM808 module sends string.How do i receive string effectively?Is this a right way to receive string?
I am using SIM808 module in my application.My UART is working as i receive byte.SIM808 module sends string.How do i receive string effectively?Is this a right way to receive string?
Code:
unsigned char Receive_char[100];
int i=0;
void interrupt ISR()
{
if(Receive_flag)
{
Receive_char[i++]=RCREG;
if(Receive_char[i]==NULL)
i=0;
receive_flag=0;
}
}