element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet & Tria Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • About Us
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      • Japan
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Vietnam
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Experts, Learning and Guidance
  • Technologies
  • More
Experts, Learning and Guidance
Ask an Expert Forum I want to interface GSM module with Tiva C Series Launch Pad
  • Blog
  • Forum
  • Documents
  • Leaderboard
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Experts, Learning and Guidance to participate - click to join for free!
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • Replies 1 reply
  • Subscribers 302 subscribers
  • Views 977 views
  • Users 0 members are here
Related
See a helpful answer?

Be sure to click 'more' and select 'suggest as answer'!

If you're the thread creator, be sure to click 'more' then 'Verify as Answer'!

I want to interface GSM module with Tiva C Series Launch Pad

Former Member
Former Member over 11 years ago

Hai

This is surendra.Currently i am doing project on Tiva C Series Launchpad(TM4C123GH6PM Micro controller).Here I want to interface my GSM module with TIVA C SERIES LAUNCH PAD.Please help me how can i interface my controller with launch pad.Please post me the code if any have done?thank u................

  • Sign in to reply
  • Cancel
Parents
  • mudz
    mudz over 11 years ago

    Hello Surendra,
    First of all, Please mention what GSM module you are using?
    Second thing is(bitter truth) no one is going to post full code for your project here or in almost all forums(unless you have a very good relations with the person who can do the job or Hire a freelancer for the job).
    Now about your project, Generally best way to interface a GSM module is using UART(mostly all GSM modules supports this interface).
    Interfacing is pretty simple.
    Consider this block diagram:
    image

     

    Also you need to look at the GSM module datasheet whether you need to interface it via MAX232 or it already has TTL logic Rx,Tx pins then consider connecting it directly to you launchpad.

    Basic Circuit(with 8051):

    image

     

    This is the Circuit with AT89c51 Microcontroller, in your case just connect it with launchpad UART pins(ignore lcd connections).
    Communication:    To Communicate with GSM modem, AT commands are required. Microcontroller sends these commands to the GSM modem, which is then activated to perform the required operation. The following AT commands are used frequently to control the operations of GSM modem:

    Command    -    Operation

    AT+CSMS    -    Select message service

    AT+CMGF    -    Message Format

    AT+CMGL    -    List messages

    AT+CMGR    -    Read mesaage

    AT+CMGS    -    Send message

    and so on.........

    You can find all AT commands, just google them.

     

    Simple c code for at89c51(I am posting it just to let you know how these commands works. you can easily convert these code to work with tiva launchpad. In fact there are example UART programs for Tiva microcontrollers just take a look at them)

    Code(8051):

    #include<reg51.h>             
    #include <stdio.h>              /* prototype declarations for I/O functions */
    #define LED P0                              //define prot P0 for LED
    
    void serial_init(void);
    
    unsigned int j;
    //Setup the serial port for 9600 baud at 11.0592MHz.
    //-------------------------------------------------
    void serial_init(void)
    {
      SCON = 0x50;                        /* SCON: mode 1, 8-bit UART, enable rcvr        */
      TMOD |= 0x20;              /* TMOD: timer 1, mode 2, 8-bit reload                  */
      TH1  = 0xFD;              /* TH1: reload value for 9600 baud @ 11.0592MHz*/
      TR1  = 1;                /* TR1: timer 1 run                            */
      TI  = 1;                /* TI:  set TI to send first char of UART          */
    }
    
    
    //Delay Routine start here
    void delay1(int n)
    {
      int i;
                for(i=0;i<n;i++);
    }
    
    void delay2(int n)
    {
      int i;
                for(i=0;i<n;i++)
                            delay1(1000);
    }
    void led_left()
    {
    for (j=0x01; j<=0x80; j<<=1)
                {
      LED = j;
      delay1(1000);               
      }
    }
    
    //-------------------------------------
    //                    Main program starts here
    //-------------------------------------
    void main(void)
    {
                serial_init();                                                                                                //serial initialization
                LED = 0x00;
                printf("AT+CMGF=1%c",13);                                                                      //Text Mode            | hex value of 13 is 0x0D (CR )     
                delay2(20);                                                   
                printf("AT+CMGS=\"9xxxxxxxxx\"%c",13);                                              //Type your mobile number Eg : "9xxxxxxxxx"
                delay2(20);                         
                led_left();                                                                                                  //scroll left
                delay1(20);
                printf("Hi :-) GSM Modem Test");                                                            //Type text as u want
                delay2(20);                                                                                           
                printf("%c",0x1A);                                                                                    //line feed command                                                       
                delay2(20);
                                 
                while(1);
    }

     

    All above information is just an example on How a GSM module is interfaced, In this case I have used 89c51 Microcontroller but it can easily be interfaced with tiva(and I just showed you how). I hope this little information about GSM module interfacing may help you.

     

    Good Luck image

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
Reply
  • mudz
    mudz over 11 years ago

    Hello Surendra,
    First of all, Please mention what GSM module you are using?
    Second thing is(bitter truth) no one is going to post full code for your project here or in almost all forums(unless you have a very good relations with the person who can do the job or Hire a freelancer for the job).
    Now about your project, Generally best way to interface a GSM module is using UART(mostly all GSM modules supports this interface).
    Interfacing is pretty simple.
    Consider this block diagram:
    image

     

    Also you need to look at the GSM module datasheet whether you need to interface it via MAX232 or it already has TTL logic Rx,Tx pins then consider connecting it directly to you launchpad.

    Basic Circuit(with 8051):

    image

     

    This is the Circuit with AT89c51 Microcontroller, in your case just connect it with launchpad UART pins(ignore lcd connections).
    Communication:    To Communicate with GSM modem, AT commands are required. Microcontroller sends these commands to the GSM modem, which is then activated to perform the required operation. The following AT commands are used frequently to control the operations of GSM modem:

    Command    -    Operation

    AT+CSMS    -    Select message service

    AT+CMGF    -    Message Format

    AT+CMGL    -    List messages

    AT+CMGR    -    Read mesaage

    AT+CMGS    -    Send message

    and so on.........

    You can find all AT commands, just google them.

     

    Simple c code for at89c51(I am posting it just to let you know how these commands works. you can easily convert these code to work with tiva launchpad. In fact there are example UART programs for Tiva microcontrollers just take a look at them)

    Code(8051):

    #include<reg51.h>             
    #include <stdio.h>              /* prototype declarations for I/O functions */
    #define LED P0                              //define prot P0 for LED
    
    void serial_init(void);
    
    unsigned int j;
    //Setup the serial port for 9600 baud at 11.0592MHz.
    //-------------------------------------------------
    void serial_init(void)
    {
      SCON = 0x50;                        /* SCON: mode 1, 8-bit UART, enable rcvr        */
      TMOD |= 0x20;              /* TMOD: timer 1, mode 2, 8-bit reload                  */
      TH1  = 0xFD;              /* TH1: reload value for 9600 baud @ 11.0592MHz*/
      TR1  = 1;                /* TR1: timer 1 run                            */
      TI  = 1;                /* TI:  set TI to send first char of UART          */
    }
    
    
    //Delay Routine start here
    void delay1(int n)
    {
      int i;
                for(i=0;i<n;i++);
    }
    
    void delay2(int n)
    {
      int i;
                for(i=0;i<n;i++)
                            delay1(1000);
    }
    void led_left()
    {
    for (j=0x01; j<=0x80; j<<=1)
                {
      LED = j;
      delay1(1000);               
      }
    }
    
    //-------------------------------------
    //                    Main program starts here
    //-------------------------------------
    void main(void)
    {
                serial_init();                                                                                                //serial initialization
                LED = 0x00;
                printf("AT+CMGF=1%c",13);                                                                      //Text Mode            | hex value of 13 is 0x0D (CR )     
                delay2(20);                                                   
                printf("AT+CMGS=\"9xxxxxxxxx\"%c",13);                                              //Type your mobile number Eg : "9xxxxxxxxx"
                delay2(20);                         
                led_left();                                                                                                  //scroll left
                delay1(20);
                printf("Hi :-) GSM Modem Test");                                                            //Type text as u want
                delay2(20);                                                                                           
                printf("%c",0x1A);                                                                                    //line feed command                                                       
                delay2(20);
                                 
                while(1);
    }

     

    All above information is just an example on How a GSM module is interfaced, In this case I have used 89c51 Microcontroller but it can easily be interfaced with tiva(and I just showed you how). I hope this little information about GSM module interfacing may help you.

     

    Good Luck image

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
Children
No Data
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2026 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube