Académique Documents
Professionnel Documents
Culture Documents
I. INTRODUCTION
Controlling devices remotely is a vision in which
humans are working hard since early times. Imagine not
only controlling device remotely but also wirelessly from
far away distance where your mobile phone works. In
this design all the home appliances can be controlled by a
simple SMS.
SMS based device switching provides a new gateway
to control your devices. SMS System is the very useful
for practical life. If you are away from your house and
want to turn on heater before you reach home simply
send a SMS to your system and its done. Sender mobile
sends a simple SMS which is received by the receiver
mobile attached in the system, SMS is then fetched by the
microcontroller which then decodes the SMS and change
the state of that device by using relays. Lights, fans,
heating, pumps, air conditioning, television, electric gates
and other home devices can be controlled simply by
sending SMS. In this system a device operating on 220V
can easily be controlled.
Sender
Mobile
SMS
Receiver
Mobile
Device
AT commands
Micro
Controller
Relay
Cost
Performance
Power Consumption
Reliability
Future Enhancements
Pin Description:
Following are the description of pins as shown in figure 2
of AT89C51.
VCC: Pin 40 is supply voltage VCC, it is +5V DC.
GND: Pin 20 is Ground in this microcontroller.
Port 0: It is a port with 8-bit open drain two way
input/output ports. When it is used as output each pin can
be sink in eight TTL inputs. When high is given to port 0
pins, the pins of this port can be used as high impedance
inputs. To access external program and data memory port
0 is used as multiplexed address and data bus. Internal
Port
Pin
P3.0
P3.1
P3.2
P3.3
P3.4
P3.5
P3.6
P3.7
Table 1
Description of Port 3
Functions
RXD (Serial Input Port)
TXD (Serial Output Port)
INT0 (External Interrupt 0)
INT1 (External Interrupt 1)
T0 (Timer 0)
T1 (Timer 1)
WR (External Data Write)
RD (External Data Read)
RST: RST is the reset pin. This pin is usually high for
two machine cycles while the oscillator connected resets
the device.
ALE/PROG: ALE stands for Address Latch Enable. For
latching the low byte of the address during access to
external memory address latch enable is used. Address
latch enable is an output pulse. During flash
programming ALE pin is also the program pulse input
(PROG).
PSEN: To read external program memory PSEN
(Program Store Enable) is used as read strobe. During the
code execution in AT89C51 from external program
memory, PSEN is activated twice for each machine
cycle, except for the two PSEN activations are skipped
during each access to external data memory.
EA/VPP: EA stands for External Access Enable. EA
must be grounded in order to enable the device to get the
code from external program memory locations. EA
should be supplied VCC for internal program executions.
This pin is also called VPP as this pin also receives the
12-volt programming enable voltage (VPP) during Flash
programming of the microcontroller, for the parts that
require 12-volt VPP.
XTAL1: It is the input to the inverting oscillator
amplifier and also to the internal clock operating circuit.
XTAL2: It is the output from the inverting oscillator
amplifier. On chip oscillator can be used if not then both
XTAL1 and XTAL2 are connected to a ceramic resonator
or quartz crystal.
AT+CMGR=1
AT+CMGL=REC UNREAD
AT+CMGL=ALL
IV. AT Commands
To control a modem in the mobile phone AT command
instruction set is used. AT is short form of Attention.
Every command is given by AT or at. Thats why
commands given to the modem are called AT commands.
Most mobile phones support AT command set that is
specific to the GSM technology, in which SMS related
commands can be used such as send SMS message, list
SMS message, read SMS message etc. There are two
types of AT commands.
Basic Commands
Extended Command
VI. SMS
Sender Mobile
Receiver Mobile