windowsxm
Newbie level 3

Hello everybody,i am new to this forum and i am hoping that somebody will help me out in solving my problem.
Recently,i have started doing a project where by i interface a microcontroller(PIC 16F628A) to a mobile phone (NOKIA 6500) to send a SMS.after a lot of googling,i have decided to use AT commands as it is very easy to understand and i used C laguage(software - MikroC pro) to program my PIC.
How did i connect my PIC to the phone?
16F628A --> MAX232 -->DB 9 Female --> USB to serial RS232 converter(RS232 side connected to DB 9)-->USB A to USB A Female Adaptor -->mobile phone's cable (USB) --> mobile phone(NOKIA 6500)
What is my problem?
i can't seem to have my code sent from the PIC to the phone.
What are the tests that i have carried out?
1- i checked the PIC functionality by writing a simple code to continuously blinking a LED.
2 - i checked whether the phone supports the AT commands by typing in the commands using Hyperterminal.
3 - i simulated the the PIC and the code using (Proteus 7 ) and it works.
Can any one point out to the thing that i am doing wrong.
Thanks in advance
The code
Recently,i have started doing a project where by i interface a microcontroller(PIC 16F628A) to a mobile phone (NOKIA 6500) to send a SMS.after a lot of googling,i have decided to use AT commands as it is very easy to understand and i used C laguage(software - MikroC pro) to program my PIC.
How did i connect my PIC to the phone?
16F628A --> MAX232 -->DB 9 Female --> USB to serial RS232 converter(RS232 side connected to DB 9)-->USB A to USB A Female Adaptor -->mobile phone's cable (USB) --> mobile phone(NOKIA 6500)
What is my problem?
i can't seem to have my code sent from the PIC to the phone.
What are the tests that i have carried out?
1- i checked the PIC functionality by writing a simple code to continuously blinking a LED.
2 - i checked whether the phone supports the AT commands by typing in the commands using Hyperterminal.
3 - i simulated the the PIC and the code using (Proteus 7 ) and it works.
Can any one point out to the thing that i am doing wrong.
Thanks in advance
The code
Code C - [expand] 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 void main(){ UART1_init(9600); UART1_Write_Text("AT+CMGF=1"); Delay_ms(2000); UART1_Write(0x0D); Delay_ms(2000); UART1_Write_Text("AT+CMGS="); //AT+CMGS= Delay_ms(1000); UART1_Write(0x22); //write (") Delay_ms(2000); UART1_Write_Text("0123456789"); //number SMS send to Delay_ms(2000); UART1_Write(0x22); // write (") UART1_Write(0x0D); // <CR> mean (ENTER) Delay_ms(2000); UART1_Write_Text("hi"); //words to be sent UART1_Write(0x0D); Delay_ms(2000); UART1_Write(26); //ctrl+z Delay_ms(2000); UART1_Write(0x0D); // <CR> mean (ENTER) Delay_ms(2000); }
Attachments
Last edited: