Mrunal Ahirrao
Full Member level 2
I am trying to work with PIC and GSM communication. In that as a notification after receieving SMS GSM sends string as:+CMTI: "SM",5.
So I want to copy that '5' in a char. But though copying it the value in the char becomes garbage value and not '5'. Here is the code snippet:
Now the SMSL should contain '5' isn't it? but it is not. It shows up some random chinese alphabet when seen on 2x16 LCD! Experts please guide me.
So I want to copy that '5' in a char. But though copying it the value in the char becomes garbage value and not '5'. Here is the code snippet:
Code:
char SMSL; // this char is to be used to store the '5'
char RXD[55];// this array is used to store strings from GSM
//this is the logic I am using (is it correct?)
//including CR and LF the place of '5' will be at RXD[14]
SMSL=RXD[14];
Now the SMSL should contain '5' isn't it? but it is not. It shows up some random chinese alphabet when seen on 2x16 LCD! Experts please guide me.