Professional Documents
Culture Documents
The main principle of this circuit is to interface a GSM modem with the microcontroller.
The microcontroller used is AT89C51 microcontroller. 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 frequently used to control the operations of GSM
modem.
Command Operation
AT+CSMS
AT+CMGF
Message format.
AT+CMGL
List messages.
AT+CMGR
Read message.
AT+CMGS
Send message.
Answer a call.
ATD
Dial a number.
ATDL
ATH
MAX232 IC.
AT89C51 microcontroller.
GSM modem.
Crystal oscillator.
Potentiometer.
void delay1(int n) {
int i; for(i=0;i
for(i=0;i<=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); delay2(20); //Text Mode | hex value of
13 is 0x0D (CR ) printf("AT+CMGS=\"9600292363\"%c",13); delay2(20); //Type your mobile
number Eg : "9884467058" led_left(); //scroll left delay1(20); printf("Hi :-) GSM Modem Test");
delay2(20); //Type text as u want printf("%c",0x1A); delay2(20); //line feed command while(1);
}