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

  • Help with finding unique wire lug(s) June 21, 2025
  • Simple LED Analog Clock Idea June 21, 2025
  • Kawai KDP 80 Electronic Piano Dead June 21, 2025
  • Saga 1400sv vinyl cutter motherboard issue June 21, 2025
  • using a RTC in SF basic June 20, 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