Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Send Msg from gsm modem using PIC 16f877

Status
Not open for further replies.

joydeepsarkar87

Member level 2
Joined
Jun 29, 2010
Messages
47
Helped
3
Reputation
6
Reaction score
2
Trophy points
1,288
Location
India
Activity points
1,563
I am using GSM modem to send the text msg to the number who has sent the previous msg to the GSM modem (i.e, REPLY to sms) I am able to retrieve the phone no. and have stored the phone no. is a array. I have also created another array for storing the msg. However wen i read the phone no. array which i have set the limit to size 12 only also includes part of the elements of msg array also.... Later on i found out dat since both the arrays have taken sequential memory locations (i.e, phone array ends at memory location 05B and msg array starts from memory location 05C.
Hence to retify this prob I created a function as below...

lcd_putnstr(13,phone_num_buf); // to check the no. where the msg is being sent.

void lcd_putnstr(unsigned char len, char *str)
{
unsigned char i = 0;
while(*str != '\0' && i < len)
{
lcd_write(*str);
str++;
i++;
}
}


void putnstr(unsigned char len, char *str)
{
unsigned char i = 0;
while(*str != NULL && i < len)
{
putch(*str);
str++;
i++;
}
}

putnstr(SIZE_OF_PH_NUM, (char* )phone_num);


#define SIZE_OF_PH_NUM 13


have declared the function where ever required but wen i compile it throws an error as...

Error [1098] conflicting declarations for variable and it points to putnstr function..

how this bug can be resolved???
[/b]
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top