Hello everybody, i would like some help in doing my project and it is basically a PIC ( 16F628A) interfaced to a GSM modem (WAVECOM FASTRACK M1306B ) where i will use the AT commands to send (only) a simple SMS to a phone number.
the problem is that i can not seem to get the AT commands to be sent from the PIC to the GSM modem and in order to identify the problem i did the following steps:
1- Check the connections and voltage drop in every important pin and everything turned out fine.
2- Test the GSM modem by connecting it the PC using hyperTerminal and i was able to send SMS to my phone.
Hi, we are pleased to see that you are using our forum.
We'd like you to become a member of our community. Membership is FREE, please REGISTER and view our forums without these annoying reminders!
Once registered you may post on the forums, download from the file areas and use the WIKI without interruption.
3- After programming my PIC to send the AT commands i connected my circuit to my computer ( PIC 16F628A + MAX232) using hyperTerminal and it showed everything as expected.
and below is the schematic and the code of my project.
NOTE:my GSM modem has a VGA port so the person that provided me the GSM modem gave me a cable that converts the VGA connection to a RS232 DB 9 (Female) connection.
(I am using MikroC Compiler )
Code:void main(){CMCON = 7; //Disable Comparators UART1_init(9600); //Initiate baud rate to 9600 Delay_ms(100); //Delay UART1_Write_Text("AT+CMGF=1"); //Write "AT+CMGF=1" UART1_Write(0x0D); //mean (ENTER) Delay_ms(100); //Delay UART1_Write_Text("AT+CMGS="); //Write "AT+CMGS=" UART1_Write(0x22); //Write (") UART1_Write_Text("xxxxxxxxxxxx"); //Number SMS send to UART1_Write(0x22); //Write (") UART1_Write(0x0D); // mean (ENTER) Delay_ms(100); //Delay UART1_Write_Text("hi"); //Words to be sent UART1_Write(26); //Write "ctrl+z" Delay_ms(100); //Delay}


Reply With Quote


Bookmarks