Professional Documents
Culture Documents
Chapter One
Introduction
Wireless communication has announced its arrival on big stage and the world is going mobile. As
we wish to control everything and without moving an inch. The main of this project will be to
design a SMS driven automatic display board which can replace the currently used programmable
electronic display .the message to be displayed is sent through a SMS from an authorized
transmitter. The microcontroller receives the SMS, validate the sender and display the desired
information. The GSM based display board can be used as add on to these display boards and make
it truly wireless. The display board program itself with the help of the incoming SMS with proper
validation. Such a system proves to be helpful for immediate transfer. The main component of the
system include Microcontroller, GSM modem. These components are integrated with the display
board and thus incorporate the wireless features. The GSM modem receives the SMS. The AT
commands are serially transferred to the modem through serial transmit and connection. In return
the modem transmit the stored message through the same serial port. The microcontroller validates
the SMS and then display the message on the LED display board. Various time division
multiplexing techniques have been suggested to make the display board functionally efficient. The
microcontroller used in this case is ATMEGA32, SIMCOM900A is used as the GSM modem. The
data will be displayed only after entering unique pass key. In addition to that address matching is
done and data can be received only by the dedicated receiver, and this data is displayed on LED
display. The main focus of the project is on displaying information to a dedicated LED display by
the any part of world using GSM network, which facilitate to control any message board globally
from any location.
1.1 Objective
The aim of the proposed system is to develop an embedded system to allow customer of the
company to read announcement from the LCD.
The system specifically has the following objectives:
Using GSM mobile we can send message to any distant located e-notice board from any
remote area
To save the time for the manager of the company
Unlike the paper it reduce the time delay and discardness
Chapter Two
Literature Review
The word GSM Refers to Global System for Mobile Communications. Nowadays many people
are showing lot of interest to know more about GSM related concepts. So, here we have surveyed
a list of various GSM based projects ideas which are having more demand and very interesting to
learn. The following projects based on GSM technology we surveyed would give better idea about
the GSM technology practically.
technologies to implement such as the teaching and learning systems. The system is capable of
supporting administrative teaching and learning activities via the SMS technology.
world’s dominant cellular standard. Today’s second-generation GSM networks deliver high
quality and secure mobile voice and data services (such as SMS Text Messaging) with full roaming
capabilities across the world. GSM platform is a hugely successful technology and as
unprecedented story of global achievement is less than ten years since the first GSM network was
commercially launched, it become, the world’s leading and fastest growing mobile standard, and
spanning over 173 countries. Today, GSM technology is in use by more than one in ten of the
world’s population and growth continues to sour with the number of subscriber worldwide
expected to surpass one billion by through end of 2003.
Today’s GSM platform is living, growing and evolving and already offers an expanded and
feature-rich ‘family’ of voice and enabling services. The Global System for Mobile
Communication (GSM) network is a cellular telecommunication network with a versatile
architecture complying with the ETSI GSM 900/GSM 1800 standard. Siemen’s implementation is
the digital cellular mobile communication system D900/1800/1900 that uses the very latest
technology to meet every requirement of the standard.
Chapter Three
The Methodology and System Design
3.1 Methodology
The goal of the proposed system is to contribute to the user who wants to display a message from
distance when one cannot able to present physically. The design of the project is basically divided
into:
Transmitting Section
Receiving Section
Transmitting section consists of just mobile which has inbuilt by GSM modem for wireless data
transfer through GSM. GSM originally from group of special mobile is the most popular standard
for mobile phone in the world. It is a cellular network, which means that mobile phone connect to
it by searching for cells in the immediate vicinity. The modulation used in GSM is GMSK, signal
to be modulated on to the carrier is first smoothed Gaussian low pass filter prior to being fed to
frequency modulator which greatly reduces adjacent channel interference. In the transmitting
section since it is a multiuser system, various are authenticated to use the system or display
messages on the notice board. For the security individual pass word are provided to authenticate
users. To display their message on notice board, user need to authenticate itself with the system by
sending the message containing the assigned pass word and the text to the receiver section SIM
number.
Receiving section consists of
GSM mobile which is used in the project to receive the message at the receiving section
and consists of GSM modem. It is a wireless modem that works with a GSM wireless
network sending and receiving data through radio waves.
Microcontroller and
LCD
Then user send the message in his/her mobile phone by defining the message and then the password
of the system to the number of the subscriber identity module (SIM) which is inserted in the display
system modem. The microcontroller will read the message from serial head phone and verify for
the password if the password is correct then it will start displaying the message in the display
system.
Power Supply
Microcontroller
LCD Display
validates it and then displays it in the LCD module. The SMS is deleted from the SIM each time
it is read, thus making room for the next SMS.
Assuming that the Liquid Crystal Display is powered and operating properly, the process of
sending or transmitting a message will proceed through the following steps:
The remote user sends text messages including commands to the receiver.
GSM receiver receives messages sent from the user cell phone.
GSM receiver decodes the sent message and sends the commands to the microcontroller.
Microcontroller issues commands to the LCD and the information sent will be displayed.
Initialize Ports
Enable LCD
Read AT Command
Incoming Message
Y
E
S
Is new
message Replace old message with new
YES one in memory
higher in
priority?
N
O
The given flowchart shown above gives the end user perspective on the control flow. During
normal operation the LCD reads a message from a fixed memory location in the microcontroller
and displays it continuously, until a new message arrives for validation. It is then when a branching
occurs basing on the validity of the sender’s number and further taking into account the priority
assigned to the new message in comparison to the previous one.
3.4.3 AT Commands
AT commands are instructions used to control a modem. AT is the abbreviation of Attention. Every
command line starts with "AT" or "at". That's why modem commands are called AT commands.
Many of the commands that are used to control wired dial-up modems, such as ATD (Dial), ATA
(Answer), ATH (Hook control) and ATO (Return to online data state), are also supported by
GSM/GPRS modems and mobile phones. Besides this common AT command set, GSM/GPRS
modems and mobile phones support an AT command set that is specific to the GSM technology,
which includes SMS-related commands like AT+CMGS (Send SMS message), AT+CMSS (Send
SMS message from storage), AT+CMGL (List SMS messages) and AT+CMGR (Read SMS
messages).
Table1: AT Command
AT Command Meaning
Instead of sending commands from the HyperTerminal, AT Command are sent to the GSM/GPRS
module by the microcontroller itself. In this case, the receive (Rx) and transmit (Tx) pin of the
GSM module’s RS232 port are connected to the transmit (Tx) and receive (Rx) pin of AT89C52’s
serial port, respectively. This eliminated the role of computer and just the controller’s circuit
provides a complete user interface for the module.
3
LCD
Tx Microcontroller Rx
1 AT Command
Information
Response 2
L Rx GSM Module Tx
To enable a computer / PC to read SMS messages from a message storage area, the GSM/GPRS
modem or mobile phone has to support either of the AT commands +CMGR (command name in
text: Read Messages) and +CMGL (command name in text: List Messages). The +CMGR AT
command is used to read an SMS message at a certain location of the message storage area, while
the +CMGL AT command is used to read SMS messages that have a certain status from the
message storage area. The status can be "received unread", "received read", "stored unsent",
"stored sent", etc. The +CMGL AT command also allows you to retrieve all SMS messages stored
in the message storage area.
Following is an example for illustrating the difference between +CMGR and +CMGL. Suppose
you want to use your computer / PC to read a text message from the message storage area and you
know the index at which the SMS text message is located. In this case, you should use the +CMGR
AT command. Here is the command line to be typed (assume the SMS text message is stored at
index 3):
AT+CMGR=3
The GSM/GPRS modem or mobile phone should return something like this:
+CMGR: "REC
READ","+85291234567","07/02/18, 00:12:05+32"
Hello, welcome to our SMS tutorial.
OK
3.5 Microcontroller
Microcontroller is a small computer on a single integrated circuit containing a processor core or
CPU, memory (ROM &RAM) and programmable I/O peripherals. The project have been carried
out AT89S52 microcontroller because of the following importance:
TheAT89C52 is a low-power, high-performance CMOS 8-bit microcontroller with 8K
bytes of in-system programmable Flash memory. The device is manufactured using Atmel
is high-density nonvolatile memory technology and is compatible with the industry
standard 80C51 instruction set and pin out. The on-chip Flash allows the program memory
to be reprogrammed in-system or by a conventional nonvolatile memory programmer.
Port 0 can also be configured to be the multiplexed low order address/data bus during
accesses to external program and data memory. In this mode, P0 has internal pull ups.
Port 0 also receives the code bytes during Flash programming and outputs the code bytes
during program verification. External pull ups are required during program verification.
Port 1
Port 1 is an 8-bit bidirectional I/O port with internal pull ups. The Port 1output buffers can
sink/source four TTL inputs. When 1s are written to Port1 pins, they are pulled high by the
internal pull ups and can be used as inputs. As inputs, Port 1 pins that are externally being
pulled low will source current because of the internal pull ups.
In addition, P1.0 and P1.1 can be configured to be the timer/counter 2 external count input
(P1.0/T2) and the timer/counter 2 trigger input (P1.1/T2EX), respectively, as shown in the
following table. Port1 also receives the low-order address bytes during Flash programming
and verification.
Alternate Functions of Port pins
P1.0 T2 (external count input to Timer/Counter 2), clock-out
P1.1 T2EX (Timer/Counter 2 capture/reload trigger and direction control)
P1.5 MOSI (used for In-System Programming)
P1.6 MISO (used for In-System Programming)
P1.7 SCK (used for In-System Programming)
Port 2
Port 2 is an 8-bit bidirectional I/O port with internal pull ups. The Port 2output buffers can
sink/source four TTL inputs. When 1s are written to Port2 pins, they are pulled high by the
internal pull ups and can be used as inputs. As inputs, Port 2 pins that are externally being
pulled low will source current because of the internal pull ups.
Port 2 emits the high-order address byte during fetches from external program memory and
during accesses to external data memory that uses 16- bit addresses. In this application, Port
2 uses strong internal pull ups when emitting 1s. During accesses to external data memory
that use
8-bit addresses, Port 2 emits the contents of the P2 Special Function Register.
Port 2 also receives the high-order address bits and some control signals during Flash
programming and verification.
Port 3
Port 3 is an 8-bit bidirectional I/O port with internal pull ups. The Port 3output buffers can
sink/source four TTL inputs. When 1s are written to Port3 pins, they are pulled high by the
internal pull ups and can be used as inputs. As inputs, Port 3 pins that are externally being
pulled low will source current because of the pull ups.
Port 3 also serves the functions of various special features of the AT89C52, as shown in the
following table. Port 3 also receives some control signals for Flash programming and
verification.
Alternate Functions of Port pins
P3.0R XD (serial input port)
P3.1TXD (serial output port)
P3.2 INT0 (external interrupt0)
P3.3 INT1 (external interrupt 1)
P3.4T0 (timer 0 external input)
P3.5T1 (timer 1 external input)
P3.6 WR (external data memory write strobe)
P3.7 RD (external data memory read strobe)
RST
Reset input. A high on this pin for two machine cycles while the oscillator is running resets
the device. This pin drives High for 96 oscillator periods after the Watchdog times out. The
DISR TO bit in SFR AUXR (address 8EH) can be used to disable this feature. In the
default state of bit DISR TO, the RESET HIGH out feature is enabled.
ALE/PROG
Address Latch Enable (ALE) is an output pulse for latching the low byte of the address
during accesses to external memory. This pin is also the program pulse input (PROG)
during Flash programming.
In normal operation, ALE is emitted at a constant rate of 1/6 the oscillator frequency and
may be used for external timing or clocking purposes. Note, however, that one ALE pulse
is skipped during each access to external data memory.
If desired, ALE operation can be disabled by setting bit0of SFR location8EH. With the bit
set, ALE is active only during a MOVX or MOVC instruction. Otherwise, the pin is
weakly pulled high. Setting the ALE disable bit has no effect if the microcontroller is in
external execution mode.
PSEN
Program Store Enable (PSEN) is the read strobe to external program memory.
When the AT89C52 is executing code from external program memory, PSEN is activated
twice each machine cycle, except that two PSEN activations are skipped during each access
to external data memory.
EA/VPP
External Access Enable. EA must be strapped to GND in order to enable the device to
fetch code from external program memory locations starting at0000H up to FFFFH.
Note, however, that if lock bit 1 is programmed, EA will be internally latched on reset.
EA should be strapped to VCC for internal program executions. This pin also receives the
12-volt programming enable voltage (VPP) during Flash programming.
XTAL1
Input to the inverting oscillator amplifier and input to the internal clock operating circuit.
XTAL2
Output from the inverting oscillator amplifier
3.7 LCD
230V Voltage
Step Down Full Wave Rectifier +5V DC
AC Regulator
Transformer
U1
7805
TR1 R1
BR1 1 3
VI VO
10k
GND
V1 C1 C2
1uF 1uF 2
C3 C4 D1
1uF 1uF LED
BRIDGE
TRAN-2P2S
C2 C3
10u
1
33p
X1 U1
CRYSTAL 19 39
XTAL1 P0.0/AD0
38
C1 P0.1/AD1
2
37
P0.2/AD2
18 36
XTAL2 P0.3/AD3
P0.4/AD4
35 R1
33p 34 10k
LCD3 P0.5/AD5
33
LM016L P0.6/AD6
9 32
RST P0.7/AD7
21
P2.0/A8 GSM MODEM
22
P2.1/A9
23
P2.2/A10
29 24
PSEN P2.3/A11
30 25
ALE P2.4/A12
31 26
EA P2.5/A13 VT1
VDD
VSS
VEE
27
RW
RS
D0
D1
D2
D3
D4
D5
D6
D7
P2.6/A14
E
28
P2.7/A15 RXD
1
2
3
4
5
6
7
8
9
10
11
12
13
14
1 10
P1.0/T2 P3.0/RXD TXD
2 11
P1.1/T2EX P3.1/TXD
3 12
P1.2 P3.2/INT0 RTS
4 13
P1.3 P3.3/INT1
5 14
P1.4 P3.4/T0 CTS
6 15
P1.5 P3.5/T1
7 16 VTERM
P1.6 P3.6/WR
8 17
P1.7 P3.7/RD
AT89C52
3.11 Limitations
Our project has certain limitations and a list of such is mentioned below:
The receiver must reside in a location where a signal with sufficient strength can be
received from a cellular phone network.
Operation of the controlling unit is only possible through a cell phone with SMS
messaging capabilities.
The Controlling unit must be able to receive and decode SMS messages.
All over the world, there could be an area where the mobile network is not established, so
no connectivity of mobile phones in that area. Therefore, SMS cannot be delivered.
Chapter Four
4.2 Recommendation
The project reflects the enormous application of GSM technology in real life situation, hence ones
should bear in mind and have awareness of using GSM technology, so that the ease with which we
use wireless communication can be shared on the entire world. Practical applications of this project
are immense and can have vast level of implementation. So this is not the end of the project but
rather is a step towards exploring other possibilities that it brings with it. We feel very happy to
work in such a challenging project which has tremendous application and possibilities.
We have recommended anyone who wants to work in such field, which actually gives a lot of
satisfaction while working. The project works in the fact gives a lot of confidence to fight out in
this challenging world. As one proceeds one cannot believe how much knowledge he/she gains
and the teamwork, which the project work teaches, really will have a new experience.
Reference
[1] International Journal of Electrical, Electronics and Data Communication, ISSN: 2320-2084
[2] www.wikipedia.org
[3] http://www.gsm modem. GSM -module
[4] www.atmel.com, AT89c52 datasheet
[5] www.ijates.com
[6] International Journal of Advanced Technology in Engineering and Science
Volume No.02, Issue No. 04, April 2014
[7] SMS Tutorial –How to use Microsoft hyper terminal to send AT commands
Appendix A
#include<reg52.h>
#include<intrins.h>
#include<string.h>
#include”lcd.h”
sbit BZ=P1^1;
bit flag=0;
bit r-flag=0;
bit success=0;
sbit AB=P3^2;
int i=0;
char idata buff[150];
//char idata num[12];
Char idata mes[60];
void send-chr(unsigned char);
bit v1=0, 1i=0;
void serial-inter(void)interrupt4{
If(TI==1)
{
TI=0;
Flag=1;
}
Else
{
RI=0
r-flag=1;
if(i<150)
buff[i++]=SBUF;
}
}
void print(char*str)
{
while(*str)
{
flag=0;
SBUF=*str++;
while(flag==0);
}
}
void transmit(unsigned char*s)
{
while(*s)
{
SBUF=*s++;
delay-ms(40);
}
}
unsigned char m;
void main( )
{
int I;
char t=0;
TMOD=0*21;
SCON=0*50;
TH1=0XFD;
TR1=1;
IE=0X92;
THO=0X00;
Int-lcd( );
display-lcd(“GSM BASED”);
cmd-ms(3000);
cmd-lcd(0*01);
display-lcd(“INITIALING”);
i=0;
print(“AT+CMGF=1\r\n”);
delay-ms(100);
sucess=0;
do
{
Strcpy(buff,” “);
r-flag=0;
i=0;
print( “AT+CMGD=1,4\r\n”);
while(i<16)
delay-ms(100);
cmd-lcd(0*co);
display-lcd( “MODEM CONNECTED”);
//display-lcd(buff);
delay-ms(1000);
I=0;
while(buff[I]!=’\0’)
{
if(buff[I++]==’E’)
sucess=1;
}
delay-ms(1000);
}
while(sucess!=1);
while(1)
{
AB=1;
sucess=0;
do
{
i=0;
strcpy(buff, “”);
r-flag=0;
do
{
i=0;
//
//
strcpy(buff,””);
}
while(r-flag==0);
delay-ms(100);
if(buff[2]==’+’)
sucess=1;
}
while(sucess!=1);
cmd-lcd(0*01);
display-lcd( “MESSAGE RECEIVED “);
BZ=0;
delay-ms(2000);
BZ=1;
i=0;
strcpy(buff, “”);
print(“AT+CMGR=1\r\n”);
delay-ms(1000);
i=0;
while(buff[I++]!=’;’)
//cdm-lcd(0*01);
//display-lcd( “ CELL NO:”);
//cdm-lcd(0*co);
//I=I++;
t=0;
while(buff[I]!=” “);
buff[I++];
do
{
buff[I++]
//num[t++]=buff[I++];
delay-ms(50);
}
while(buff[I]!= “ “);
//num[t]=’\0’;
//cmf-lcd(0*01);
//display-lcd(num);
//display-ms(1000);
cmd-lcd(0*01);
cmd-lcd(0*co);
while(buff[I]!= “”);
(buff[I++]);
while(buff[I++]!=0*0d);
cmd-lcd(0*01);
display-lcd(“MESSAGE:”);
cmd-lcd(0*co);
//buff[I++];
//write-lcd(buff[I]);
do
{
mes[t++]=buff[I++];
//delay-ms(50);
}
while(buff[I]!=0*0d);
mes[t]=’\o’;
delay-ms(1000);
cmd-lcd(0X01);
//cdm-lcd(0X18);
display-lcd(mes);
cmd-lcd(0Xco);
delay-ms(2000);
sucess=0;
do
{
strcpy(buff,” “ );
r-flag=0;
i=0;
print(“AT+CMGD=1,0\r\n”);
while(i<14)
delay-ms(100);
I=0;
while(buff[I]!=’\0’)
{
if(buff[I++]==’E’)
sucess=1;
}
delay-ms(500);
}
while(sucess!=1);
//cmd-lcd(0*01);
}
}
void send-chr(unsigned charc)
{
Flag=0;
SBUF=c;
while(flag==0);
}
/////////////////////////////////////////////////////
Appendix B
#include<reg52.h>
#define LCD P2
sbit RS=p0^0;
sbitRW=P0^1;
sbit EN=P0^2;
void delay-ms(unsigned int i)
{
unsigned int i;
while(i==>0)
{
;
}
}
}
void cdm-lcd(unsigned char c)
{
RS=0;
RW=0;
EN=1;
LCD=c;
delay-ms(10);
EN=0;
delay-ms(10);
}
void int-lcd(void)
{
delay-ms(10);
cmd-lcd(0*38);
delay-ms(10);
cmd-lcd(0*06)
delay-ms(10);
cmd-lcd(0*01);
}
void write-lcd(unsigned charc)
{
RS=1;
RW=0;
EN=1;
LCD=c;
delay-ms(10);
EN=0;
delay-ms(10)
}
void display-lcd(unsigned charc*s)
{
while(*s)
write-lcd(*s++);
}
//////////////////////////////////////////////
#include<string.h>
#include”lcd.h”
sbit AB=P3^2;
bit flag=0;
bit r-flag0;
bit sucess=0;
int i=0;
char i data buff[140];
char i data num[12];
char i data mes[20];
void send-chr(unsigned char);
void transmit(unsigned char*t-data)
{
while(*t-data!=’\0’)
{
SBUF=*t-data;
t-data++;
delay-ms(30);
}
}
void serial intr(void)interrupt4
{
if(TI==1)
{
TI=0;
flag=1;
}
else
{
RI=0;
r-flag=1;
if(i<160)
buff[i++]=SBUF;
}
}
void print(char*str)
{
while(*str)
{
flag=0;
SBUF=*str++;
while(flag==0);
}
}
unsigned char m;
void main( )
{
int I;
char t=0;
TMOD=0*21,
SCON=0*50
THI=0XFD;
TRL=1;
IE=0X90;
int-lcd( );
display-lcd(“GSM SCROLLING”);
cdm-lcd(0*co);
display-lcd(“LED DISPLAY SYS”);
delay-ms(3000);
AB=0;
cmd-lcd(0*01);
display-lcd(“INITIALIZING”);
i=0;
print(“AT+CMGF=1|r|n”);
display-ms(100);
sucess=0;
do
{
strcpy(buff,” “);
r-flag=0;
i=0;
print(“AT+CMGD=1,4\r\n”);
while(i<16)
delay-ms(100);
i=0;
while(buff[I]!=’\0’)
{
if(buff[I++]!=’\0’)
{
if(buff[I++]==’E’)
sucess=1;
}
delay-ms(1000);
}
while(Sucess!=1);
cmd-lcd(0*01);
display-lcd(“MODEM CONNECTED”);
delay-ms(1000);
cmd-lcd(0X01);
display-lcd(‘GSM SCROLLING”);
cmd-lcd(0Xco);
display-lcd(“LED DISPLAY SYS”);
delay-ms(1000);
while(1)
{
AB=0;
sucess=0;
int-lcd( );
display-lcd(“GSM SCROLLING”);
cdm-lcd(0*C0);
display-lcd(“LED DISPLAY SYS”);
delay-ms(200);
do
{
i=0;
strcpy(buff,” “);
r-flag=0;
do
{
i=0;
strcpy(buff,” “);
}
while(r-flag==0);
delay-ms(100);
if(buff[2]==’+’)
sucess=1;
}
while(sucess!=1);
cmd-lcd(0*01);
display-lcd(“MESSAGE RECIEVED”);
delay-ms(1000);
i=0;
strcpy(buff.” “);
print(“AT+CMGR=1\r\n”);
delay-ms(1000);
i=0;
while(buff[I++]!=’;);
cmd-lcd(0*01);
display-lcd(‘CELL NO: “);
cmd-lcd(0*C0);
//I=I++;
t=0;
while(buff[I]!=” “);
buff[I++];
do
{
//buff[I++];
num[I++]=buff[I++];
delay-ms(50);
}
while(buff[I]!=” “);
num[t]=’\0’;
cdm-lcd(0*C0);
display-lcd(num);
delay-ms(1000);
while(buff[I]!=” “)
(buff[I++];
while(buff[I++]!=0*0d);
cdm-lcd(0*01);
display-lcd(“MESSAGE READING”);
cmd-lcd(0*co);
buff[I++];
//write-lcd(buff[I]);
//delay-ms(1000);
t=0;
//write(buff[I]!=” “);
//buff[I++];
do
{
mes[t++]=buff[I++];
delay-ms(5);
}
while(buff[I]!=0*0d);
mes[t]=’\0’;
delay-ms(200);
cmd-lcd(0*01);
display-lcd(mes);
delay-ms(2000);
if(strcmp(mes,’’FORMAT”)==0)
{
AB=1;
cmd-lcd(0*01);
display-lcd(“MESSAGE DELETED”);
delay-lcd(100);
send chr(‘#’);
delay-ms(1000);
send-chr(‘4’);
delay-ms(1000);
send-char(‘6’);
delay-ms(5000);
AB=0;
}
else
{
AB=1;
//EA=0;
cmd-lcd(0*01);
display-lcd( “ DISPLAY SETTING”);
delay-ms(100);
send-chr(‘*’);
delay-ms(2000);
transmit(“LM”);
transmit(mes);
transmit( “><s1><DL1>\r\n”);
send-chr(0*0d);
delay-ms(5000);
EA=1;
AB=0; }
//delay-ms(2000);
send-chr(0*0d);
print(“AT+CMGD=1\r\n”);
delay-ms(1000);
print(“AT+CMGD=2|r|n”);
delay-ms(1000);
print(“AT+CMGD=3|r|n”);
delay-ms(1000);
cmd-lcd(0*01); }
}
void send-chr(unsigned char c){
flag=0;
SBUF=c;
while(flag==0);
}