AT commands and Interfacing a PIC microcontroller with a GSM module

Published by: 0

AT commands are a list of commands that you can use to communicate with any kind of a mobile phone or a GSM module serially. First you have to identify the GSM module and it’s own AT commands list first. In a case that you don’t have a GSM module, you can use a basic mobile phone connected to the pc as a gsm module. (note it’s not working stand alone, always with the PC)

After connecting the mobile/GSM module to the PC via serial or USB try to communicate with it with using a hyper terminal(win XP) or Putty client(any OS). Download putty from here. 

http://www.youtube.com/watch?v=Nvf_QBez8w0

Same way find the serial port of the GSM module and try to communicate.

There are various at commands to select sms mode, dial a number, Bluetooth(mobiles with bluetooth), access sim memory and all operations.

Ex: ATD 0711234567;

//dials the number

ATH

Hang the phone

Note : if you are using a mobile phone, there’s a big possibility of it’s not supporting the text mode but the PDU mode.  To check the format it supports, type AT+CMGF=? in the terminal. If the device returns “0” it supports only the pdu mode. That implies you can’t send a text as it’s but need to convert into PDU format.

If it returns 1 or 0,1 it says it supports text mode and both respectively.

Interfacing with the IC

After you are done with your mobile/gsm module and understand the AT commands, use ISIS to simulate the circuit.

AT commands can be issued to the device via HSEROUT/TX pin of the IC. And will be received by the RX pin of the device. (Module or the phone. If it’s a micro usb phone, u don’t need to worry about the TX,RX of the device)

To output a command to the device using hardware serial port of the PIC,

hserout [“ATD 711234567;”,13,10];

//13 : carriage return , 10: new line character