Joke Collection Website - Public benefit messages - STC89C52 MCU controls the program of sending short messages to SIM 600A module, which is urgent! ! !

STC89C52 MCU controls the program of sending short messages to SIM 600A module, which is urgent! ! !

void uart_int(void)

{

TMOD = 0x 20; //Timer 1 works in mode 2.

th 1 = 0x FD;

TL 1 = 0x FD; //Baud rate 9600

tr 1 = 1;

EA = 1;

SM0 = 0;

sm 1 = 1;

Ren =1; //Allow serial reception

ES = 1; //Open serial port interrupt

}

Voidinitialprs()// Initialization function

{

Send (at);

delay _ GSM(400);

Send (te);

delay _ GSM(400);

Send (cmgf);

delay _ GSM(400);

}

void sendmessage9()

{

Send (CIPSGP);

Delay _ GSM (1800);

Send (clport);

Delay _ GSM (1800);

Send (cdsorip);

Delay _ GSM (1800);

Send (CIICR);

Delay _ GSM (1800);

Send (cifsr);

Delay _ GSM (1800);

Send (cdnscfg);

Delay _ GSM (1800);

Send (CIP start);

Delay _ GSM (1800);

Delay _ GSM (1800); Delay _ GSM (1800); Delay _ GSM (1800); Delay _ GSM (1800); Delay _ GSM (1800); Delay _ GSM (1800);

Cip send;

Delay _ GSM (1800);

To send (a message);

Delay _ GSM (1800);

Delay _ GSM (1800);

Cip closed;

Delay _ GSM (1800);

}