void main(void)
{
int t,a,b;
t = a = b = 0;
static char Duration[3];
static char PHnum[]='+6 0; //my country code is +6 and i print a 0 at the end to stop the LCD from displaying
gibberish and 10 empty spaces. This will be edited later
char Key = 'n';
LCD_Begin();
InitKeypad();
InitGSM();
LCD_Cmd(LCD_CLEAR);
LCD_Print("Enter Phone No.");
while(a<12){
Key = switch_press_scan_num();
if ((Key == '#')&&(a>0))
{
PHnum[a-1]=' ';
LCD_Goto(1, 2);
LCD_Printr(PHnum);
__delay_ms(200);
a--;
}
else if (Key != '#')
{
LCD_Goto(1, 2);
PHnum[a] = Key;
LCD_Printr(PHnum);
__delay_ms(200);
a++;
}
};
LCD_Cmd(LCD_CLEAR);
while (b<12){
phoneno[b]=PHnum[b];
b++;
}
sms("Hello World");
}