Académique Documents
Professionnel Documents
Culture Documents
The mobile which will be useful in women security which would be controlled
from anywhere else. It is also highly economic and less expensive; hence GSM is
preferred most for this mode of controlling. In this application we are maintaining a
switch. In the worst situation when we press switch at that time with location place will
be sent to the android mobile which is enrolled in the memory IC should get a message
like help needed. We are using LCD to display on the screen while sending message like
(message sending to cell *********).
GPS gives only the longitude and latitude values but by using Android application
in the mobile we can easily get the location name from where the message has been
sent. The controller takes the switch as its input i.e. when some threat has occurred
one need to press that switch and the controller makes the GSM module to message to
the pre-stored number. In this way the concerned person will know the location and
they will be able to save the candidate. With a wide range of serial communications
interfaces, they are also very well suited for communication gateways, protocol
converters and embedded soft modems as well as many other general-purpose
applications.
INDEX
2. LITERATURE SURVEY
2.1 Literature Survey 3
3. DESIGN IMPLEMENTATION
3.1 Block diagram 4
3.2 Power Supply 5
3.3 Introduction to AT89S52 10
3.4 Introduction to GPS 25
3.5 Introduction to GSM Modem 32
3.6 Introduction to PUSH button 36
3.7 Introduction to MAX 232 40
3.8 Introduction to LCD 42
3.9 Introduction to EEPROM 48
6. PROJECT OUTLOOK
6 Project Outlook 64
Appendix 67
LIST OF FIGURES
4. Addresses of MSB-LSB 38
6. SCON Register 41
9. Functionality of Pins 43
system in vehicle.
Chapter 3: The problem definition, aim and objective of the project are
explained.
explained.
are explained.
system.
explained.
Chapter 8: The limitations and future scope of the project are explained.
Existing System
3.1BLOCK DIAGRAM
D.C
230V AC
Output
50Hz
Transformer:
Usually, D.C voltages are required to operate various electronic
equipment and these voltages are 5V, 9V or 12V. But these voltages
cannot be obtained directly. Thus the A.C input available at the mains
supply i.e., 230V is to be brought down to the required voltage level. This
is done by a transformer. Thus, a step down transformer is employed to
decrease the voltage to a required level.
Rectifier:
The output from the transformer is fed to the rectifier. It converts
A.C. into pulsating D.C. The rectifier may be a half wave or a full wave
rectifier. In this project, a bridge rectifier is used because of its merits
like good stability and full wave rectification.
Filter:
Capacitive filter is used in this project. It removes the ripples from
the output of rectifier and smoothens the D.C. Output received from
this filter is constant until the mains voltage and load is maintained
constant. However, if either of the two is varied, D.C. voltage received at
this point changes. Therefore, a regulator is applied at the output stage.
Voltage regulator:
As the name itself implies, it regulates the input applied to it. A
voltage regulator is an electrical regulator designed to automatically
maintain a constant voltage level. In this project, power supply of 5V and
12V are required. In order to obtain these voltage levels, 7805 and 7812
voltage regulators are to be used. The first number 78 represents positive
supply and the numbers 05, 12 represent the required output voltage
levels.
Memory:
Input devices:
Output devices:
The output devices of the embedded systems also have very limited
capability. Some embedded systems will have a few Light Emitting
Diodes (LEDs) to indicate the health status of the system modules, or for
visual indication of alarms. A small Liquid Crystal Display (LCD) may
also be used to display some important parameters.
Communication interfaces:
The embedded systems may need to, interact with other embedded
systems at they may have to transmit data to a desktop. To facilitate this,
the embedded systems are provided with one or a few communication
interfaces such as RS232, RS422, RS485, Universal Serial Bus (USB),
IEEE 1394, Ethernet etc.
Application-specific circuitry:
Sensors, transducers, special processing and control circuitry may
be required fat an embedded system, depending on its application. This
circuitry interacts with the processor to carry out the necessary work.
The entire hardware has to be given power supply either through the 230
volts’ main supply or through a battery. The hardware has to design in
such a way that the power consumption is minimized.
Introduction to MICROCONTROLLERS:
Microprocessors and microcontrollers are widely used in embedded
systems products. Microcontroller is a programmable device. A
microcontroller has a CPU in addition to a fixed amount of RAM, ROM,
I/O ports and a timer embedded all on a single chip. The fixed amount of
on-chip ROM, RAM and number of I/O ports in microcontrollers makes
them ideal for many applications in which cost and space are critical.
The Intel 8052 is Harvard architecture, single chip microcontroller
(µC) which was developed by Intel in 1980 for use in embedded systems.
It was popular in the 1980s and early 1990s, but today it has largely
been superseded by a vast range of enhanced devices with 8052-
compatible processor cores that are manufactured by more than 20
independent manufacturers including Atmel, Infineon Technologies and
Maxim Integrated Products.
8052 is an 8-bit processor, meaning that the CPU can work on only
8 bits of data at a time. Data larger than 8 bits has to be broken into 8-
bit pieces to be processed by the CPU. 8052 is available in different
memory types such as UV-EPROM, Flash and NV-RAM.
The present project is implemented on Keil uVision. In order to
program the device, proload tool has been used to burn the program onto
the microcontroller.
The features, pin description of the microcontroller and the
software tools used are discussed in the following sections.
FEATURES
• Compatible with MCS-51® Products
• Watchdog Timer
• Power-off Flag
DESCRIPTION:
The AT89S52 is a low-power, high-performance CMOS 8-bit
microcontroller with 8K bytes of in-system programmable Flash memory.
The Idle Mode stops the CPU while allowing the RAM,
timer/counters, serial port, and interrupt system to continue
functioning. The Power-down mode saves the RAM contents but freezes
the oscillator, disabling all other chip functions until the next interrupt
or hardware reset.
PIN DESCRIPTION
VCC
Supply voltage.
GND
Ground.
Port 0
Port 1
Port 2
Port 2 is an 8-bit bidirectional I/O port with internal pull-ups. The
Port 2 output buffers can sink/source four TTL inputs. When 1s are
written to Port 2 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 (IIL) 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 use 16-bit
addresses (MOVX @ DPTR). In this application, Port 2 uses strong
internal pull-ups when emitting 1s. During accesses to external data
memory that use 8-bit addresses (MOVX @ RI), 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
in the following table. Port 3 also receives some control signals for Flash
programming and verification.
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 DISRTO bit in SFR
AUXR (address 8EH) can be used to disable this feature. In the default
state of bit DISRTO, 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 bit 0 of SFR location 8EH. With the bit set, ALE is active only
during a MOVX or MOVC instruction.
PSEN
Program Store Enable (PSEN) is the read strobe to external
program memory. When the AT89S52 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
XTAL1
XTAL2
Program Memory
The oldest models of the 8052 microcontroller family did not have
any internal program memory. It was added from outside as a separate
chip. These models are recognizable by their label beginning with 803 (for
ex. 8031 or 8032). All later models have a few Kbytes ROM embedded,
even though it is enough for writing most of the programs, there are
situations when additional memory is necessary. A typical example of it
is the use of so called lookup tables. They are used in cases when
something is too complicated or when there is no time for solving
equations describing some process. The example of it can be totally exotic
(an estimate of self-guided rockets’ meeting point) or totally common
(measuring of temperature using non-linear thermos element or
asynchronous motor speed control). In those cases, all needed estimates
and approximates are executed in advance and the final results are put
in the tables (similar to logarithmic tables).
EA=1 In this case, a program from built-in ROM is to be executed first (to
the last location). Afterwards, the execution is continued by reading
additional memory.
In both cases, P0 and P2 are not available to the user because they
are used for data and address transmission. Besides, the pins ALE and
PSEN are used too.
Data Memory
As already mentioned, Data Memory is used for temporarily storing
and keeping data and intermediate results created and used during
microcontroller’s operating. Besides, this microcontroller family includes
many other registers such as: hardware counters and timers,
input/output ports, serial data buffers etc. The previous versions have
the total memory size of 256 locations, while for later models this number
is incremented by additional 128 available registers. In both cases, these
first 256 memory locations (addresses 0-FFh) are the base of the
memory. Common to all types of the 8052 microcontrollers. Locations
available to the user occupy memory space with addresses from 0 to 7Fh.
First 128 registers and this part of RAM is divided in several blocks.
(A0-A7) on P0. In this way, IC circuit 74HCT573 which "lets in" the
first 8 bits to memory address pins is activated.
A signal on the pin ALE closes the IC circuit 74HCT573 and
immediately afterwards 8 higher bits of address (A8-A15) appear on
the port. In this way, a desired location in additional program
memory is completely addressed. The only thing left over is to read
its content.
Pins on P0 are configured as inputs, the pin PSEN is activated and
the microcontroller reads content from memory chip. The same
connections are used both for data and lower address byte.
Addressing
Direct Addressing
accessed in this case the first half of the basic RAM is intended to be
used freely, while another half is reserved for the SFRs.
Indirect Addressing
A Register (Accumulator)
B Register
R Registers (R0-R7)
Satellites
24 GPS satellites are currently in orbit around the earth. the first
was launched in 1972 and the latest satellite was launched in 2012. The
maximum available at any time from a point in Oregon is generally
between 4 to 11. The satellites send out radio signals that are collected
and read by the GPS receiver.
GPS satellites broadcast signals from space that are picked up and
identified by GPS receivers. Each GPS receiver then provides three-
dimensional location (latitude, longitude, and altitude) plus the time.
SPACE SEGMENT:
24+ satellites
20,200 km altitude
55 degrees’ inclination
12-hour orbital period
5 ground control stations
Here are some other interesting facts about the GPS satellites (also
called NAVSTAR, the official U.S. Department of Defense name for GPS):
The receiver must be aware of the PRN codes for each satellite to
reconstruct the actual message data. The C/A code, for civilian use,
transmits data at 1.023 million chips per second, whereas the P code, for
U.S. military use.
They may also include a display for providing location and speed
information to the user. A receiver is often described by its number of
channels: this signifies how many satellites it can monitor
When people talk about "a GPS," they usually mean a GPS receiver.
The Global Positioning System (GPS) is actually a constellation of 24
Earth-orbiting satellites The U.S. military developed and implemented
this satellite network as a military navigation system, but soon opened it
up to everybody else.
GSM MODEM
Architecture
Technical Specifications
Frame Structure
Channels
Security
Characteristics and features
Applications
GSM-History
Duplexing FDD
Modulation GMSK
GSM was originally defined for the 900 MHz range but after some
time even the 1800 MHz range was used for cellular technology. The
1800 MHz range has its architecture and specifications almost same to
that of the 900 MHz GSM technology but building the Mobile exchanges
is easier and the high frequency Synergy effects add to the advantages of
the 1800 MHz range.
Ciphering Codes:
A3/8:
The A5 algorithm is the stream cipher used to encrypt over the air
transmissions. The stream cipher is initialized for every frame sent with
the session key Kc and the no. of frames being decrypted / encrypted.
The same Kc key is used throughout the call but different 22-bit frame is
used.
USES:
1. Microcontroller
2. PC
3. RS 232 cable
4. MAX 232 IC
5. HyperTerminal
TIMERS:
The 8052 has two timers: Timer 0 and Timer 1. They can be used
either as timers to generate a time delay or as counters to count events
happening outside the microcontroller. Lower byte register of Timer 0 is
TL0 and higher byte is TH0. Similarly, lower byte register of Timer1 is
TL1 and higher byte register is TH1.
Both timers 0 and 1 use the same register TMOD to set the various
operation modes. TMOD is an 8-bit register in which the lower 4 bits are
set aside for Timer 0 and the upper 4 bits for Timer 1. In each case, the
lower 2 bits are used to set the timer mode and the upper 2 bits to
specify the operation.
MSB LSB
TIMER 1 TIMER 0
GATE
Every timer has a means of starting and stopping. Some timers do
this by software, some by hardware and some have both software and
hardware controls. The timers in the 8052 have both. The start and stop
of the timer are controlled by the way of software by the TR (timer start)
bits TR0 and TR1. These instructions start and stop the timers as long as
GATE=0 in the TMOD register. The hardware way of starting and
stopping the timer by an external source is achieved by making GATE=1
in the TMOD register.
C/T
Timer or counter selected. Cleared for timer operation and set for
counter operation.
M1 Mode bit 1
M0 Mode bit 0
RS232 CABLE:
To allow compatibility among data communication equipment, an
interfacing standard called RS232 is used. Since the standard was set
long before the advent of the TTL logic family, its input and output
voltage levels are not TTL compatible. For this reason, to connect any
RS232 to a microcontroller system, voltage converters such as MAX232
are used to convert the TTL logic levels to the RS232 voltage levels and
vice versa.
3.7 INTRODUCTION TO MAX 232:
Max232 IC is a specialized circuit which makes standard voltages
as required by RS232 standards. This IC provides best noise rejection
and very reliable against discharges and short circuits. MAX232 IC chips
are commonly referred to as line drivers. To ensure data transfer between
PC and microcontroller, the baud rate and voltage levels of
Microcontroller and PC should be the same. The voltage levels of
microcontroller are logic1 and logic 0 i.e., logic 1 is +5V and logic 0 is 0V.
But for PC, RS232 voltage levels are considered and they are: logic 1 is
taken as -3V to -25V and logic 0 as +3V to +25V. So, in order to equal
these voltage levels, MAX232 IC is used. Thus this IC converts RS232
voltage levels to microcontroller voltage levels and vice versa.
1 1 Serial Mode 3
Of the four serial modes, only mode 1 is widely used. In the SCON
register, when serial mode 1 is chosen, the data framing is 8 bits, 1 stop
bit and 1 start bit, which makes it compatible with the COM port of IBM/
compatible PC’s. And the most important is serial mode 1 allows the
baud rate to be variable and is set by Timer 1 of the 8052. In serial mode
1, for each character a total of 10 bits are transferred, where the first bit
is the start bit, followed by 8 bits of data and finally 1 stop bit.
LCD stands for Liquid Crystal Display. LCD is finding wide spread use
replacing LEDs (seven segment LEDs or other multi segment LEDs)
because of the following reasons:
A model described here is for its low price and great possibilities
most frequently used in practice. It is based on the HD44780
microcontroller (Hitachi) and can display messages in two lines with 16
characters each. It displays all the alphabets, Greek letters, punctuation
marks, mathematical symbols etc. In addition, it is possible to display
symbols that user makes up on its own. Automatic shifting message on
display (shift left and right), appearance of the pointer, backlight etc. are
considered as useful characteristics.
Pins Functions
There are pins along one side of the small printed board used for
connection to the microcontroller. There are total of 14 pins marked with
numbers (16 in case the background light is built in). Their function is
described in the table below:
Ground 1 Vss - 0V
LCD screen:
LCD screen consists of two lines with 16 characters each. Each
character consists of 5x7 dot matrix. Contrast on display depends on the
power supply voltage and whether messages are displayed in one or two
lines. For that reason, variable voltage 0-Vdd is applied on pin marked as
Vee. Trimmer potentiometer is usually used for that purpose. Some
versions of displays have built in backlight (blue or green diodes). When
used during operating, a resistor for current limitation should be used
(like with any LE diode).
CONTRAST CONTROL:
Potentiometer:
Presets:
MEMORY:
Memory capacity:
Memory organization:
Speed:
The different types of memories are RAM, ROM, EPROM and EEPROM.
DESCRIPTION:
SIGNAL DESCRIPTIONS
The SCL input pin is used to synchronize all data in and out of the
memory. A resistor can be connected from the SCL line to VCC to act as a
pull up.
These chip enable inputs are used to set the 2 least significant bits
(b2, b3) of the 7-bit device select code. These inputs may be driven
dynamically or tied to VCC or VSS to establish the device select code.
The PRE input pin, in addition to the status of the Block Address
Pointer bit (b2, location 1FFh as in below figure), sets the PRE write
protection active.
Mode (MODE):
DEVICE OPERATION
Start Condition:
Stop Condition:
Data Input:
During data input the ST24/25x04 sample the SDA bus signal on
the rising edge of the clock SCL. Note that for correct device operation the
SDA signal must be stable during the clock low to high transition and the
data must change ONLY when the SCL line is low.
Memory Addressing:
significant bits of the device select code are the device type identifier,
corresponding to the I2C bus definition. For these memories the 4 bits
are fixed as 1010b. The following 2 bits identify the specific memory on
the bus. They are matched to the chip enable signals E2, E1. Thus up to
4 x 4K memories can be connected on the same bus giving a memory
capacity total of 16 Kilobits. After a START condition any memory on the
bus will identify the device code and compare the following 2 bits to its
chip enable inputs E2, E1. The 7th bit sent is the block number (one
block = 256 bytes). The 8th bit sent is the read or write bit (RW), this bit
is set to ’1’ for read and ’0’ for write operations. If a match is found, the
corresponding memory will acknowledge the identification on the SDA
bus during the 9th bit time.
Write Operations:
Byte Write:
In the Byte Write mode, the master sends one data byte, which is
acknowledged by the memory. The master then terminates the transfer
by generating a STOP condition. The Write mode is independent of the
state of the MODE pin which could be left floating if only this mode was
to be used. However, it is not a recommended operating mode, as this pin
has to be connected to either VIH or VIL, to minimize the stand-by
current.
Multibit Write:
For the Multibit Write mode, the MODE pin must be at VIH. The
Multibit Write mode can be started from any address in the memory. The
master sends from one up to 4 bytes of data, which are each
acknowledged by the memory. The transfer is terminated by the master
generating a STOP condition. The duration of the write cycle is Tw =
10ms maximum except when bytes are accessed on 2 rows (that is have
different values for the 6 most significant address bits A7-A2), the
programming time is then doubled to a maximum of 20ms. Writing more
than 4 bytes in the Multibit Write mode may modify data bytes in an
adjacent row (one row is 8 bytes long). However, the Multibit Write can
properly write up to 8 consecutive bytes as soon as the first address of
these 8 bytes is the first address of the row, the 7 following bytes being
written in the 7 following bytes of this same row.
Page Write:
For the Page Write mode, the MODE pin must be at VIL. The Page
Write mode allows up to 8 bytes to be written in a single write cycle,
provided that they are all located in the same ’row’ in the memory: that is
the 5 most significant memory address bits (A7-A3) are the same inside
one block. The master sends from one up to 8 bytes of data, which are
each acknowledged by the memory. After each byte is transferred, the
internal byte address counter (3 least significant bits only) is
incremented. The transfer is terminated by the master generating a STOP
condition. Care must be taken to avoid address counter ’roll-over’ which
could result in data being overwritten. Note that, for any write mode, the
generation by the master of the STOP condition starts the internal
memory program cycle. All inputs are disabled until the completion of
this cycle and the memory will not respond to any request.
During the internal write cycle, the memory disconnects itself from
the bus in order to copy the data from the internal latches to the memory
cells. The maximum value of the write time (Tw) is given from the AC
Characteristics, since the typical time is shorter, the time seen by the
system may be reduced by an ACK polling sequence issued by the
master.
Data in the upper block of 256 bytes of the memory may be write
protected. The memory is write protected between a boundary address
and the top of memory (address 1FFh) when the PRE input pin is taken
high and when the Protect Flag (bit b2 in location 1FFh) is set to ’0’. The
boundary address is user defined by writing it in the Block Address
Pointer. The Block Address Pointer is an 8 bit EEPROM register located
at the address 1FFh. It is composed by 5 MSBs Address Pointer, which
defines the bottom boundary address and 3 LSBs which must be
programmed at ’0’. This Address Pointer can therefore address a
boundary in steps of 8 bytes.
Write the data to be protected into the top of the memory, up to,
but not including, location 1FFh;
Set the protection by writing the correct bottom boundary address
in the Address Pointer (5 MSBs of location 1FFh) with bit b2
(Protect flag) set to ’0’. Note that for a correct functionality of the
memory, all the 3 LSBs of the Block Address Pointer must also be
programmed at ’0’. The area will now be protected when the PRE
input pin is taken High. While the PRE input pin is read at ’0’ by
the memory, the location 1FFh can be used as a normal EEPROM
byte.
Read Operations:
NOT acknowledge the byte output, but terminates the transfer with a
STOP condition.
Sequential Read:
5.1 ADVANTAGES:
Sophisticated security
Monitors all hazards and threats
Alert message to mobile phone for remote information
Mobile number can be changed at any time
5.2 APPLICATIONS:
5.3 DISADVANTAGES:
5.4 LIMITATIONS:
6.PROJECT OUTLOOK:
MESSAGE DISPLAYED:
7.CONCLUSION:
work includes the study of GSM and GPS modems using sensors.
The biggest advantage of using this project is, whenever the switch
is pressed we will be getting the location from GSM modem to our mobile
numbers which are stored in EEPROM and GSM network so that one can
Using wireless GPS modem and wireless Panic button the carrying
8.2 BIBLIOGRAPHY:
1. WWW.MITEL.DATABOOK.COM
2. WWW.ATMEL.DATABOOK.COM
3. WWW.FRANKLIN.COM
4. WWW.KEIL.COM
5. WWW.EMBEDDED.COM
6. WWW.ATMELCORPORATION.COM
7. WWW.WIKIPEDIA.COM
8. WWW.IKALOGIC.COM/CAT_MICROCONTROLLERS.PHP
APPENDIX
SOURCE CODE
#include"reg51.h"
#include"string.h"
#include<i2c.h>
sbit SCL=P3^2;
sbit SDA=P3^3;
bit receive,received=0;
unsigned char buffer[35],Pno[10],ch,j,t;
SCL=1;
v=v|SDA;
}
SCL=0;
stop();
return v;
}
void start(void)
{
SCL=1;
SDA=1;
_nop_();
_nop_();
SDA=0;
SCL=0;
}
void ptos(unsigned char a)
{
unsigned char i,c;
for(i=0;i<=7;i++)
{
c=a&128;
if(c==0)
SDA=0;
else
SDA=1;
SCL=1;
_nop_();
_nop_();
SCL=0;
a=a<<1;
}
SDA=1;
_nop_();
_nop_();
SCL=1;
_nop_();
_nop_();
SCL=0;
}
void stop(void)
{
SDA=0;
SCL=1;
_nop_();
_nop_();
SDA=1;
SCL=0;
}
void main(void)
{
unsigned char use=0;
TH1 = 0xFD;
TMOD = 0X20;
SCON = 0X50;
TR1 = 1;
lcd_init();
led=1;
t=0;
led=0;
message(0X80,"PRESS #");
message(0xc0,"TO CHANGE NO1");
myfunction1(0);
message(0X80,"PRESS #");
message(0xc0,"TO CHANGE NO2");
myfunction1(10);
message(0X80,"PRESS #");
message(0xc0,"TO CHANGE NO3");
myfunction1(20);
message(0X80,"PRESS #");
message(0xc0,"TO CHANGE NO4");
myfunction1(30);
while(1)
{
unsigned char j=0;
if(swt==0)
{
command(0x01);
message(0x80,"ALERT!!");
led=1;
buzzer=0;
delay(100);
for(i=0;i<=9;i++)
{
Pno[i]=read(i);
delay(100);
}
send_msg(Pno);
delay(500);
delay(500);
delay(500);
delay(500);
delay1(1000);
for(i=10,j=0;i<=19;i++,j++)
{
Pno[j]=read(i);
delay(100);
}
send_msg(Pno);
delay(500);
delay(500);
delay(500);
delay(500);
delay1(1000);
for(i=20,j=0;i<=29;i++,j++)
{
Pno[j]=read(i);
delay(100);
}
send_msg(Pno);
delay(500);
delay(500);
delay(500);
delay(500);
delay1(1000);
for(i=30,j=0;i<=39;i++,j++)
{
Pno[j]=read(i);
delay(100);
}
send_msg(Pno);
delay(500);
delay(500);
delay(500);
command(0x01);
delay1(1000);
led=0;
message(0x80,"ALERT!!");
while(1);
}
else
{
command(0x80);
lcddata('L');
lcddata('A');
lcddata('T');
lcddata('-');
for(i=2;i<=12;i++)
{
lcddata(buffer[i]);
}
command(0xc0);
lcddata('L');
lcddata('O');
lcddata('N');
lcddata('-');
for(i=15;i<=25;i++)
{
lcddata(buffer[i]);
}
delay(10);
}
}
en = 1;
delay(1);
en = 0;
}