EngineersGarage

  • Engineers Garage Main Site
  • Visit our active EE Forums
    • EDABoard.com
    • Electro-Tech-Online
  • Projects & Tutorials
    • Circuits
    • Electronic Projects
    • Tutorials
    • Components
  • Digi-Key Store
    • Cables, Wires
    • Connectors, Interconnect
    • Discrete
    • Electromechanical
    • Embedded Computers
    • Enclosures, Hardware, Office
    • Integrated Circuits (ICs)
    • Isolators
    • LED/Optoelectronics
    • Passive
    • Power, Circuit Protection
    • Programmers
    • RF, Wireless
    • Semiconductors
    • Sensors, Transducers
    • Test Products
    • Tools
  • Advertise
You are here: Home / Replies / PIC32 to M95 GSM interface

PIC32 to M95 GSM interface

|

Projects › Projects › PIC32 to M95 GSM interface › PIC32 to M95 GSM interface

April 1, 2016 at 11:16 am #13840
nilesh
Participant

Hi,

        Which PIC32 you are using?In general GSM module work on AT commands.For the interfacing of the GSM and PIC microcontroller you need to write UART receive Interrupt code.

sample here

void UART1Handler (void) __irq 
{
char TEMP = 0;
  TEMP = U1IIR;
  
if(TEMP & 0x04)
{
while(U1LSR & 0x01)
{
TEMP = U1RBR;
Buffer[Count] = TEMP;
Count++;
if ( Count >= BUFSIZE ) Count = 0;
}
}
  
MSSG[6] = MSSG[5];
MSSG[5] = MSSG[4];
MSSG[4] =MSSG[3];
MSSG[3] = MSSG[2];
MSSG[2] = MSSG[1];
MSSG[1] = MSSG[0];
MSSG[0] = TEMP;
if(TEMP == '>')GTR = 1;
if((MSSG[1] == 'O') && (MSSG[0] == 'K')) I_OK = 1; 
if((MSSG[1] == 'I') && (MSSG[0] == 'P')) I_IP = 1; 
if((MSSG[4] == 'E') && (MSSG[3] == 'R')&& (MSSG[2] == 'R')&& (MSSG[1] == 'O')&& (MSSG[0] == 'R')) ERR = 1; 
if((MSSG[6] == 'C') && (MSSG[5] == 'O')&& (MSSG[4] == 'N')&& (MSSG[3] == 'N')&& (MSSG[2] == 'E')&& (MSSG[1] == 'C')&& (MSSG[0] == 'T')) CNT = 1; 
if((MSSG[5] == '2')&& (MSSG[4] == '0')&& (MSSG[3] == '0')&& (MSSG[2] == ' ')&& (MSSG[1] == 'O')&& (MSSG[0] == 'K')) S_200 = 1; 
if((MSSG[5] == 'W')&& (MSSG[4] == '!')&& (MSSG[3] == 'B')&& (MSSG[2] == '@')&& (MSSG[1] == 'E')&& (MSSG[0] == '#')) flag = 1; 
if((MSSG[5] == 'A')&& (MSSG[4] == 'R')&& (MSSG[3] == 'R')&& (MSSG[2] == 'I')&& (MSSG[1] == 'E')&& (MSSG[0] == 'R')) NCRR = 1;
if((MSSG[3] == 'R')&& (MSSG[2] == 'I')&& (MSSG[1] == 'N')&& (MSSG[0] == 'G')) Ring = 1;
if((MSSG[3] == '+')&& (MSSG[2] == 'C')&& (MSSG[1] == 'M')&& (MSSG[0] == 'T'))
{  
smsrcv = 1;
Count = 0;
}
 
  VICVectAddr = 0;
}

RSS Recent Posts

  • Droplet1 December 14, 2025
  • Bringing a Siemens W-48 and Ericsson Model 1951 back to life December 14, 2025
  • What is involved to convert a small town to fiber optic? December 14, 2025
  • mechanism to shutdown feeding when sensor temperature rises December 13, 2025
  • Oshonsoft MSSP simulation question December 13, 2025

Stay Up To Date

Newsletter Signup
EngineersGarage

Copyright © 2025 WTWH Media LLC. All Rights Reserved. The material on this site may not be reproduced, distributed, transmitted, cached or otherwise used, except with the prior written permission of WTWH Media
Privacy Policy | Advertising | About Us

Search Engineers Garage

  • Engineers Garage Main Site
  • Visit our active EE Forums
    • EDABoard.com
    • Electro-Tech-Online
  • Projects & Tutorials
    • Circuits
    • Electronic Projects
    • Tutorials
    • Components
  • Digi-Key Store
    • Cables, Wires
    • Connectors, Interconnect
    • Discrete
    • Electromechanical
    • Embedded Computers
    • Enclosures, Hardware, Office
    • Integrated Circuits (ICs)
    • Isolators
    • LED/Optoelectronics
    • Passive
    • Power, Circuit Protection
    • Programmers
    • RF, Wireless
    • Semiconductors
    • Sensors, Transducers
    • Test Products
    • Tools
  • Advertise