Remove Text Formatting

+ Reply to Thread
Results 1 to 3 of 3
  1. #1

    Default Interfacing PIC 16F628A to a modem

    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.

    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 )

    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}
    Attached Images Attached Images  

  2. #2
    Join Date
    Nov 2003
    Wellton, U.S.A.

    Default Re: Interfacing PIC 16F628A to a modem

    (I am using MikroC Compiler )
    This forum is for Pic Basic. You will have better luck asking questions about MikroC on a MikroC forum.
    Always wear safety glasses while programming.

  3. #3

    Default Re: Interfacing PIC 16F628A to a modem

    So sorry ....this is really embarrassing...i guess i rushed into it without taking good look at the website's name and i guess it is because there are a lot of topics regarding GSM modem interfacing...

Members who have read this thread : 1

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts