gsm based sms driven automatic display tool kit
Post on 03-Jan-2016
185 Views
Preview:
DESCRIPTION
TRANSCRIPT
GSM BASED AUTOMATIC DISPLAY TOOLKIT
CHAPTER1
INTRODUCTIONAND
BLOCK DIAGRAM
DEPTT. OF ELECTRONICS AND COMMUNICATION ENGG. Page 1
GSM BASED AUTOMATIC DISPLAY TOOLKIT
1.1 INTRODUCTION
Presently, the United States is the most technologically advanced country in the area of
telecommunications with about; 126 million phone lines, 7.5 million cellular phone users,5
thousand AM radio broadcast stations, 5 thousand FM radio stations, 1 thousand television
broadcast stations, 9 thousand cable television systems, 530 million radios, 193 million
television sets, 24 ocean cables, and scores of satellite facilities! This is truly an
"Information Age" and sometimes, you need to look at where we've been in order to see
the future more clearly!
1.1.1 Information
---“A message received and understood” --- Princeton
---“Information is a term with many meanings depending on context, but is as a rule
closely related to such concepts as meaning, knowledge, instruction, communication,
representation, and mental stimulus ”
--- Wikipedia
--- “any communication or representation of knowledge such as facts, data, or opinions in
any medium or form, including textual, numerical, graphic, cartographic, narrative, or
audiovisual forms (OMB Circular A-130). ”
--- Gils.net
--- “Facts, concepts, or instructions; any sort of knowledge or supposition which can be
communicated. “ --- Cedar.Web.Cern
--- “Is organized data that has been arranged for better comprehension or understanding.
What is one person's information can become another person's data.” --- earthlink.net
1.1.2 Information Transfer
A coordinated sequence of user and telecommunications system actions that cause
information present at a source user to become present at a destination user.
DEPTT. OF ELECTRONICS AND COMMUNICATION ENGG. Page 2
GSM BASED AUTOMATIC DISPLAY TOOLKIT
Note: An information-transfer transaction usually consists of three consecutive phases
called the access phase, the information-transfer phase, and the disengagement phase.
1.2 Broadcast
A term to describe communication where a piece of information is sent or transmitted from
one point to all other points. There is just one sender, but the information is simultaneously
sent to all connected receivers. In networking, a distinction is made between Broadcasting
and Multicasting.
Broadcasting sends a message to everyone on the network whereas multicasting sends a
message to a select list of recipients .One of the most common examples is broadcast
through a cellular network service. This serves multiple end users at different locations in a
simulcast fashion. Practically every cellular system has some kind of broadcast
mechanism.
This can be used directly for distributing information to multiple mobiles, commonly, for
example in a mobile telephony system, the most important use of broadcast information is
to set up channels for one to one communication between the mobile Trans-receiver and
the base station. This is called Paging. The details of the process of paging vary somewhat
from network to network, but normally we know a limited number of cells where the
phone is located (this group of cells is called a location area in the GSM system or Routing
Area in UMTS).
Paging takes place by sending the broadcast message on all of those cells. Today,
interaction with digital displays is a deskbound or device-dependent experience. However,
developments in display and information sharing technologies may enable a new form of
interaction with digital media: ‘ubiquitous computing’. In ubiquitous computing, the
physical location of data and processing power is not apparent to the user. Rather,
information is made available to the user in a transparent and contextually relevant
manner.
DEPTT. OF ELECTRONICS AND COMMUNICATION ENGG. Page 3
GSM BASED AUTOMATIC DISPLAY TOOLKIT
A single display device restricts the repertoire of interactions between the user and digital
media, so ubiquitous computing requires displays wherever the user might need one – in
appliances, tabletops public transport, walls, etc. This project aims at integrating the
expansiveness of a wireless cellular network and the ease of information transfer through
the SMS with the coverage of public display boards. It is thereby a modest effort to realize
the complete potential of public display boards in instantaneous information broadcast in
swift response to events of interests.
1.3 BLOCK DIAGRAM
As explained in the introduction chapter, the realization of complete potential of the
display boards and the wireless medium in information transfer is the major issue that the
following thesis of the following project deals with.
Fig 1.1 Block diagram of GSM based SMS driven Automatic Display Toolkit
As we see in the above figure, there are at least two interfacing circuits:-
GSM Module with Microcontroller
Microcontroller with LCD Display
DEPTT. OF ELECTRONICS AND COMMUNICATION ENGG. Page 4
GSM BASED AUTOMATIC DISPLAY TOOLKIT
1.4 DESCRIPTION OF BLOCKS
1.4.1 GSM HANDSET
GSM (Global System for Mobile Communications, originally Group Special
Mobile), is a standard set developed by the European Telecommunications
Standards Institute (ETSI) to describe technologies for second generation (2G)
digital cellular networks. Developed as a replacement for first generation (1G)
analog cellular networks.
GSM handset is used to send the message to the GSM MODULE. The message
which is send through the GSM Mobile will be display on the LCD.
Fig 1.2 GSM Handset
1.4.2 GSM MODULE
GSM modules are similar to modems but there is one difference –A GSM Modem
is an external equipment where as a GSM Module is a module that can be
integrated within an equipment.
GSM Module is an embedded piece of hardware.
GSM Module receives the message from the mobile station.
DEPTT. OF ELECTRONICS AND COMMUNICATION ENGG. Page 5
GSM BASED AUTOMATIC DISPLAY TOOLKIT
Fig 1.3 GSM Module
1.4.3 MICROCONTROLLER
The microcontroller which is used in this project is AT89S52.
Microcontroller is a microprocessor designed specifically for control
applications, and is equipped with ROM, RAM and facilities I / O on a
single chip.
AT89S52 is one of the family MCS-51/52 equipped with an internal 8
Kbyte Flash EPROM (Erasable and Programmable Read Only Memory),
which allows memory to be reprogrammed.
Fig 1.4 Microcontroller AT89S52
1.4.4 LCD Display
16*2 Alphanumeric LCD’s are used.
The message which is sent from the mobile phone is displayed on the LCD.
DEPTT. OF ELECTRONICS AND COMMUNICATION ENGG. Page 6
GSM BASED AUTOMATIC DISPLAY TOOLKIT
Fig 1.5 16*2 LCD Display
1.5 FEATURES OF PROJECT
The main aim of the project will be to design a SMS driven automatic display
toolkit which can replace the currently used programmable electronic display.
This project deals with the integration of the expansiveness of a wireless cellular
network and the ease of information transfer through the SMS with the coverage of
public display boards.
The message to be displayed is sent through a SMS from a transmitter. The toolkit
receives the SMS and displays the desired information after necessary code
conversion.
It is useful to display the messages in a large geographical area like- college
campus, offices, railway stations, airports etc.
It will display same message on every LCD’s at a time.
1.6 SYSTEM OVERVIEW
The component description of this system can be divided into the following stages-
Definition of all features of our project.
Designing block diagram.
DEPTT. OF ELECTRONICS AND COMMUNICATION ENGG. Page 7
GSM BASED AUTOMATIC DISPLAY TOOLKIT
Designing of all circuits.
Implementing circuits and components.
Giving software overview.
Writing the codes of all the functions.
Writing actual codes for microcontroller.
Compiling the code.
Burning the hex file into microcontroller with programmer.
Testing.
Running.
Documentation.
1.7 ADVANTAGES
Information can be transferred at different places at a time.
The electronics displays which are currently used are programmable displays
which need to be reprogrammed each time. This makes it inefficient for
immediate information transfer, and thus the display board loses its
importance where as GSM BASED TOOLKIT replace this problem.
This display board programs itself with the help of the incoming SMS with
proper validation. Such a system proves to be helpful for immediate
information transfer.
The GSM based display toolkit can be used as an add-on to these display
boards and make it truly wireless.
Information can be transferred at different places at a time.
1.8 APPLICATION
The system is made efficient by using ‘clone’ SIMs of same MIN in a
geographical area so that the same SMS can be received by number of display
boards in a locality using techniques of time division multiple access.
This project is already an application of GSM.
DEPTT. OF ELECTRONICS AND COMMUNICATION ENGG. Page 8
GSM BASED AUTOMATIC DISPLAY TOOLKIT
1.9 FUTURE ASPECT
The use of microcontroller in place of a general purpose computer allows us to
theorize on many further improvements on this project prototype.
Temperature display during periods wherein no message buffers are empty is one
such theoretical improvement that is very possible.
Another very interesting and significant improvement would be to accommodate
multiple receiver MODEMS at the different positions in a geographical area
carrying duplicate SIM cards.
Multilingual display can be another added variation of the project.
MMS technology along with relatively high end microcontrollers to carry on the
tasks of graphics encoding and decoding along with a more expansive bank of
usable memory can make this task a walk in the park.
DEPTT. OF ELECTRONICS AND COMMUNICATION ENGG. Page 9
GSM BASED AUTOMATIC DISPLAY TOOLKIT
HARDWARE SECTION
2.1 BLOCK DIAGRAM OF SETUP BOX
DEPTT. OF ELECTRONICS AND COMMUNICATION ENGG. Page 10
GSM BASED AUTOMATIC DISPLAY TOOLKIT
Fig 2.1 The Basic Hardware of the ProjectA – Microcontroller
B – LCD display
C – GSM Module
D – SIM
E –9 Pin Female Plug
F – Transformer
G – Magnet Mount Antenna
H – Power Reset Button
I – LED
J – Diode
K – Capacitor
L – Crystal
M – PCB
N – Resistor
O – Coaxial Cable
2.2 DESCRIPTION OF 8051 MICROCONTROLLER
DEPTT. OF ELECTRONICS AND COMMUNICATION ENGG. Page 11
GSM BASED AUTOMATIC DISPLAY TOOLKIT
2.2.1 8051 MICROCONTROLLER
8051 is the name of a big family of microcontrollers. The device which we used in our
project was the 'AT89S52' which is a typical 8051 microcontroller manufactured by Atmel.
2.2.2 FEATURES
1) 8051 have 128 bytes of RAM
2) 8051 have 128 user defined flags
3) It consist of 16 bit address bus
4) It also consist of 3 internal and two external interrupts
5) Less power usage in 8051 with respect to other micro-controller
6) It consist of 16-bit program counter and data pointer
7) 8051 can process 1 million one-cycle instructions per second
8) It also consist of 32 general purpose registers each of 8 bits
9) ROM on 8051 is 4 Kbytes in size
10) It also consist of Two 16 bit Timer/ Counter
2.2.3 TYPES OF MEMORY
The 8051 has three very general types of memory. To effectively program the 8051 it is
necessary to have a basic understanding of these memory types.
Fig 2.2 Memory Configuration of 8051
DEPTT. OF ELECTRONICS AND COMMUNICATION ENGG. Page 12
GSM BASED AUTOMATIC DISPLAY TOOLKIT
On-Chip Memory refers to any memory (Code, RAM, or other) that physically
exists on the microcontroller itself. On-chip memory can be of several types, but
we'll get into that shortly.
External Code Memory is code (or program) memory that resides off-chip. This
is often in the form of an external EPROM.
External RAM is RAM memory that resides off-chip. This is often in the form of
standard static RAM or flash RAM.
CODE MEMORY
Code memory is the memory that holds the actual 8051 program that is to be run.
This memory is limited to 64K and comes in many shapes and sizes. Code memory
may be found on-chip, either burned into the microcontroller as ROM or EPROM.
Code may also be stored completely off-chip in an external ROM or, more
commonly, an external EPROM.
Flash RAM is also another popular method of storing a program. Various
combinations of these memory types may also be used--that is to say, it is possible
to have 4K of code memory on-chip and 64k of code memory off-chip in an
EPROM.
When the program is stored on-chip the 64K maximum is often reduced to 4k, 8k,
or 16k. This varies depending on the version of the chip that is being used.
EXTERNAL RAM
As an obvious opposite of Internal RAM, the 8051 also supports what is called
External RAM.
As the name suggests, External RAM is any random access memory which is
found off-chip.
Since the memory is off-chip it is not as flexible in terms of accessing, and is also
slower. For example, to increment an Internal RAM location by 1 requires only 1
instruction and 1 instruction cycle. To increment a 1-byte value stored in External
RAM requires 4 instructions and 7 instruction cycles. In this case, external memory
is 7 times slower!
DEPTT. OF ELECTRONICS AND COMMUNICATION ENGG. Page 13
GSM BASED AUTOMATIC DISPLAY TOOLKIT
External RAM loses in speed and flexibility it gains in quantity.
While Internal RAM is limited to 128 bytes the 8051 supports External RAM up to
64K.
2.2.4 BASIC REGISTERS
THE ACCUMULATOR
The Accumulator, as it’s name suggests,is used as a general register to accumulate
the results of a large number of instructions.
It can hold an 8-bit (1-byte) value and is the most versatile register the 8051 has
due to the sheer number of instructions that make use of the accumulator.
More than half of the 8051’s 255 instructions manipulate or use the accumulator in
some way.
THE "R" REGISTERS
The "R" registers are a set of eight registers that are named R0, R1, etc. up to and
including R7.
These registers are used as auxiliary registers in many operations.
The "R" registers are also used to temporarily store values.
THE "B" REGISTER
The "B" register is very similar to the Accumulator in the sense that it may hold an
8-bit (1-byte) value.
The "B" register is only used by two 8051 instructions: MUL AB and DIV AB.
THE DATA POINTER (DPTR)
The Data Pointer (DPTR) is the 8051’s only user-accessable 16-bit (2-byte)
register.
The Accumulator, "R" registers, and "B" register are all 1-byte values.
DEPTT. OF ELECTRONICS AND COMMUNICATION ENGG. Page 14
GSM BASED AUTOMATIC DISPLAY TOOLKIT
THE PROGRAM COUNTER (PC)
The Program Counter (PC) is a 2-byte address which tells the 8051 where the next
instruction to execute is found in memory.
When the 8051 is initialized PC always starts at 0000h and is incremented each
time an instruction is executed.
It is important to note that PC isn’t always incremented by one. Since some
instructions require 2 or 3 bytes the PC will be incremented by 2 or 3 in these
cases.
The Program Counter is special in that there is no way to directly modify it’s value.
THE STACK POINTER (SP)
The Stack Pointer, like all registers except DPTR and PC, may hold an 8-bit (1-
byte) value.
The Stack Pointer is used to indicate where the next value to be removed from the
stack should be taken from.
When you push a value onto the stack, the 8051 first increments the value of SP
and then stores the value at the resulting memory location.
When you pop a value off the stack, the 8051 returns the value from the memory
location indicated by SP, and then decrements the value of SP.
2.3 DESCRIPTION OF BLOCKS (SETUP BOX)
2.3.1 AT89S52 MICROCONTROLLER
The AT89S52 has 4 different ports, each one having 8 Input/output lines providing
a total of 32 I/O lines.
Those ports can be used to output DATA and orders do other devices, or to read the
state of a sensor, or a switch.
Most of the ports of the AT89S52 have 'dual function' meaning that they can be
used for two different functions.
DEPTT. OF ELECTRONICS AND COMMUNICATION ENGG. Page 15
GSM BASED AUTOMATIC DISPLAY TOOLKIT
The first one is to perform input/output operations and the second one is used to
implement special features of the microcontroller like counting external pulses,
interrupting the execution of the program according to external events, performing
serial data transfer or connecting the chip to a computer to update the software.
Each port has 8 pins, and will be treated from the software point of view as an 8-
bit variable called 'register', each bit being connected to a different Input/ Output
pin.
Fig 2.3 AT89S52 microcontroller
2.3.1.1 FEATURES
Four-port I / O, which each consist of eight bits.
4.0V to 5.5V Operating Range.
Fully Static Operation: 0 Hz to 33 MHz.
Two-level Program Memory Lock.
256 x 8-bit Internal RAM internally.
32 Programmable I/O Lines.
Three 16-bit Timer/Counters.
A CPU (Central Processing Unit) 8 Bit.
The internal oscillator and timing circuits.
Five interrupt lines.
The size of 8 KByte EPROM for program memory.
DEPTT. OF ELECTRONICS AND COMMUNICATION ENGG. Page 16
GSM BASED AUTOMATIC DISPLAY TOOLKIT
Maximum speed execution of instructions per cycle is 0.5 s at 24 MHz clock
frequency.
2.3.1.2 CONNECTIONS IN MICROCONTROLLER
Fig 2.4 Connection in microcontroller
CPU (CENTRAL PROCESSING UNIT)
This section serves to control the entire operation on the microcontroller. This unit is
divided into two parts, the control unit, or CU (Control Unit) and the arithmetic and logic
unit or ALU (Arithmetic Logic Unit) The main function control unit is to take instructions
from memory (fetch) and then translate the composition of these instructions into a simple
collection of work processes (decode), and implement instruction sequence in accordance
with the steps that have been determined the program (execute). Arithmetic and logic unit
is the part that deals with arithmetic operations like addition, subtraction, and logical data
manipulation operations such as AND, OR, and comparison.
MEMORY
DEPTT. OF ELECTRONICS AND COMMUNICATION ENGG. Page 17
GSM BASED AUTOMATIC DISPLAY TOOLKIT
There are two different memory types:- RAM and EEPROM. Shortly, RAM is used to
store variable during program execution, while the EEPROM memory is used to store the
program itself, that's why it is often referred to as the 'program memory'. It is clear that the
CPU (Central Processing Unit) is the heart of the micro controllers. It is the CPU that will
Read the program from the FLASH memory and Execute it by interacting with the
different peripherals.
PART INPUT / OUTPUT (I / O)
This section serves as a communication tool with a single chip device outside the system.
Consistent with the name, I / O devices can receive and provide data to / from a single
chip.
There are two kinds of devices I / O is used, ie devices for serial connection UART
(Universal Asynchronous Receiver Transmitter) and device for so-called parallel
relationship with the PIO (Parallel Input Output).Both types of I / O has been available in a
single chip AT89S52.
SOFTWARE
Single flakes MCS-51 family has a special programming language that is not understood
by other types of single flakes. This programming language known by the name of the
assembler language instruction has 256 devices. However, when this can be done with
microcontroller programming using C language .With the C language, microcontroller
programming easier, because the C language format will be automatically converted into
assembler language with a hex file format. Software on a microcontroller can be divided
into five groups as follows:
DATA TRANSFER INSTRUCTIONS
This instruction serves to move the data, between registers, from memory to memory, from
registers to memory, and others.
ARITHMETIC INSTRUCTION
DEPTT. OF ELECTRONICS AND COMMUNICATION ENGG. Page 18
GSM BASED AUTOMATIC DISPLAY TOOLKIT
These instructions perform arithmetic operations including addition, subtraction, addition
of one (increments), a reduction of one (decrement), multiplication and division.
LOGIC AND BIT MANIPULATION INSTRUCTIONS
Functions perform logic operations AND, OR, XOR, comparison, shift and complement
data.
BRANCHING INSTRUCTIONS
Serves to alter the normal sequence of execution of a program . With this instruction, the
programs that are implemented will jump to a particular address.
INSTRUCTION STACK, I / O AND CONTROL
These instructions set the stack usage, read / write I / O ports, and controlling.
2.3.1.3 DESCRIPTION
The AT89S52 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’s 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.
By combining a versatile 8-bit CPU with in-system programmable Flash on a monolithic
chip, the Atmel AT89S52 is a powerful microcontroller which provides a highly-flexible
and cost-effective solution to many embedded control applications.
The AT89S52 provides the following standard features: 8K bytes of Flash, 256 bytes of
RAM, 32 I/O lines, Watchdog timer, two data pointers, three 16-bit timer/counters, a six-
DEPTT. OF ELECTRONICS AND COMMUNICATION ENGG. Page 19
GSM BASED AUTOMATIC DISPLAY TOOLKIT
vector two-level interrupt architecture, a full duplex serial port, on-chip oscillator, and
clock circuitry.
In addition, the AT89S52 is designed with static logic for operation down to zero
frequency and supports two software selectable power saving modes.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 con-tents but freezes the
oscillator, disabling all other chip functions until the next interrupt or hardware reset.
2.3.1.4 PIN CONFIGURATION
AT89S52 microcontroller has 40 pins with a single 5 Volt power supply. The pin 40 is
illustrated as follows:
Fig 2.5 Pin Diagram
DEPTT. OF ELECTRONICS AND COMMUNICATION ENGG. Page 20
GSM BASED AUTOMATIC DISPLAY TOOLKIT
2.3.1.5 PIN DESCRIPTION
VCC - Supply voltage.
GND - Ground.
Port 0 -
Port 0 is an 8-bit open drain bidirectional I/O port. As an output port, each pin can
sink eight TTL inputs. When 1s are written to port 0 pins, the pins can be used as
high-impedance inputs.
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 1 output
buffers can sink/source four TTL inputs.
When 1s are written to Port 1 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 (IIL) 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. Port 1 also receives the low-order
address bytes during Flash programming and verification.
DEPTT. OF ELECTRONICS AND COMMUNICATION ENGG. Page 21
GSM BASED AUTOMATIC DISPLAY TOOLKIT
Table 2.1 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 -
Port 3 is an 8-bit bidirectional I/O port with internal pull-ups. The Port 3 output
buffers can sink/source four TTL inputs. When 1s are written to Port 3 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 (IIL) because of the
DEPTT. OF ELECTRONICS AND COMMUNICATION ENGG. Page 22
GSM BASED AUTOMATIC DISPLAY TOOLKIT
pull-ups. Port 3 receives some control signals for Flash programming and
verification.
Port 3 also serves the functions of various special features of the AT89S52, as
shown in the following table:-
Table 2.2 Port 3
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 98 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.
DEPTT. OF ELECTRONICS AND COMMUNICATION ENGG. Page 23
GSM BASED AUTOMATIC DISPLAY TOOLKIT
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. 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 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-
External Access Enable EA must be strapped to GND in order to enable the
device to fetch code from external program memory locations starting at 0000H
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.
DEPTT. OF ELECTRONICS AND COMMUNICATION ENGG. Page 24
GSM BASED AUTOMATIC DISPLAY TOOLKIT
XTAL2-
Output from the inverting oscillator amplifier.
Special Function Registers-
A map of the on-chip memory area called the Special Function Register (SFR)
space. Note that not all of the addresses are occupied, and unoccupied addresses
may not be implemented on the chip.
Read accesses to these addresses will in general return random data, and write
accesses will have an indeterminate effect.
User software should not write 1s to these unlisted locations, since they may be
used in future products to invoke new features. In that case, the reset or inactive
values of the new bits will always be 0.
Timer 2Registers:
Control and status bits are contained in registers T2CON ) and T2MOD for
Timer 2. The register pair (RCAP2H, RCAP2L) are the Capture/Reload
registers for Timer 2 in 16-bit capture mode or 16-bit auto-reload mode.
Interrupt Registers:
The individual interrupt enable bits are in the IE register. Two priorities can be
set for each of the six interrupt sources in the IP register.
DEPTT. OF ELECTRONICS AND COMMUNICATION ENGG. Page 25
GSM BASED AUTOMATIC DISPLAY TOOLKIT
2.3.1.6 BLOCK DIAGRAM
Fig 2.6 Block Diagram of AT89S52
DEPTT. OF ELECTRONICS AND COMMUNICATION ENGG. Page 26
GSM BASED AUTOMATIC DISPLAY TOOLKIT
2.3.1.7 Memory Organization
All single chip in the family division of MCS-51 has the address space to programs and
data. The separation of program memory and data memory allows data to be accessed by a
memory address 8 bits. Even so, the address memory 16 bits of data can be generated
through the DPTR register (Point Data Register). Program memory can only be read
cannot be written because it is stored in the EPROM. In this case the EPROM is available
in a single chip AT89S52 for 8 Kbyte.
Fig 2.7 AT89S52 Microcontroller memory
Memory Program
If EA’s low value, the program will occupy the address 1000 H to FFFF H to external
programs.
If the EA pin is connected to GND, all program fetches are directed to external memory.
On the AT89S52, if EA is connected to VCC, program fetches to addresses 0000H through
1FFFH are directed to internal memory and fetches to addresses 2000H through FFFFH
are to external memory.
DEPTT. OF ELECTRONICS AND COMMUNICATION ENGG. Page 27
GSM BASED AUTOMATIC DISPLAY TOOLKIT
Data memory
Internal data memory are mapped as shown below memory space is divided into three
blocks of the 128 down, 128 up, and space SFR (Special Function Register) Under Section
128 bytes of RAM mapped into
the 32 bytes are grouped into four banks and eight registers (R0 to R7). In the next 16
bytes, on the banks of register, form a block of memory space that can bit addressable. All
bytes that are within 128 below can be accessed either directly or indirectly.
The AT89S52 implements 256 bytes of on-chip RAM. The upper 128 bytes occupy a
parallel address space to the Special Function Registers. This means that the upper 128
bytes have the same addresses as the SFR space but are physically separate from SFR
space.
When an instruction accesses an internal location above address 7FH, the address mode
used in the instruction specifies whether the CPU accesses the upper 128 bytes of RAM or
the SFR space. Instructions which use direct addressing access the SFR space.
2.3.1.8 UART-
The UART in the AT89S52 operates the same way as the UART in the AT89C51 and
AT89C52.
2.3.1.9 TIMER 0 AND 1-
Timer 0 and Timer 1 in the AT89S52 operate the same way as Timer 0 and Timer 1 in the
AT89C51 and AT89C52.
2.3.1.10 TIMER 2
Timer 2 is a 16-bit Timer/Counter that can operate as either a timer or an event counter.
The type of operation is selected by bit C/T2 in the SFR T2CON (shown in Table 5-2).
Timer 2 has three operating modes: capture, auto-reload (up or down counting), and baud
rate generator.
DEPTT. OF ELECTRONICS AND COMMUNICATION ENGG. Page 28
GSM BASED AUTOMATIC DISPLAY TOOLKIT
The modes are selected by bits in T2CON, as shown in Table 10-1. Timer 2 consists of two
8-bit registers, TH2 and TL2. In the Timer function, the TL2 register is incremented every
machine cycle. Since a machine cycle consists of 12 oscillator periods, the count rate is
1/12 of the oscillator frequency.
Table 2.3 Timer 2 Operating Mode
2.3.1.11 INTERRUPTS-
The AT89S52 has a total of six interrupt vectors: two external interrupts (INT0 and INT1),
three timer interrupts (Timers 0, 1, and 2), and the serial port interrupt. These interrupts are
all shown in Figure 2.8.
Each of these interrupt sources can be individually enabled or disabled by setting or
clearing a bit in Special Function Register IE.
IE also contains a global disable bit, EA, which disables all interrupts at once. Timer 2
interrupt is generated by the logical OR of bits TF2 and EXF2 in register T2CON.
Neither of these flags is cleared by hardware when the service routine is vectored to. In
fact, the service routine may have to determine whether it was TF2 or EXF2 that generated
the interrupt, and that bit will have to be cleared in software.
The Timer 0 and Timer 1 flags, TF0 and TF1, are set at S5P2 of the cycle in which the
timers overflow. The values are then polled by the circuitry in the next cycle.
DEPTT. OF ELECTRONICS AND COMMUNICATION ENGG. Page 29
GSM BASED AUTOMATIC DISPLAY TOOLKIT
However, the Timer 2 flag, TF2, is set at S2P2 and is polled in the same cycle in which
the timer overflows.
Fig 2.8 Interrupt Sources
2.3.1.12 TIMERS AND COUNTERS IN AT89S52
Diagram below shows a simplified diagram of the main peripherals present in the
AT89S52 or 8052 / 8051. There are 3 Timers/Counters in the 89S52.
The expression "Timer/Counter" is used because this unit can act as a Counter or as a
Timer as per requirement. Timer/Counter 2 is a special counter that does not behave like
the two others, because of some extra functionality.
The serial port, using a UART (Universal Asynchronous Receive Transmit) protocol can
be used in a wide range of communication applications. With the UART provided in the
DEPTT. OF ELECTRONICS AND COMMUNICATION ENGG. Page 30
GSM BASED AUTOMATIC DISPLAY TOOLKIT
AT89S52 it is easy to communicate with a serial port equipped computer, as well as
communicate with another microcontroller.
If all the peripherals described above can generate interrupt signals in the CPU according
to some specific events, it can be useful to generate an interrupt signal from an external
device that may be a sensor or a Digital to Analog converter. For that purpose there are 2
External Interrupt sources (INT0 and INT1).
Fig 2.9 Timers and Counters in AT89S52
2.3.2 LIQUID CRYSTAL DISPLAY
Fig 2.10 16*2 LCD
DEPTT. OF ELECTRONICS AND COMMUNICATION ENGG. Page 31
GSM BASED AUTOMATIC DISPLAY TOOLKIT
A liquid crystal display (LCD) is a thin, flat display device made up of any number of
color or monochrome pixels arrayed in front of a light source or reflector. It is prized by
engineers because it uses very small amounts of electric power, and is therefore suitable
for use in battery-powered electronic devices.
LCD’s are passive display having low power consumption and contrast ratio. The
characteristic of LCD’s are given below:
LCD’s operate on the principle of light scattering. They can be operated
either in a reflective or transmissive configuration. There operation
dependent on ambient or back lightering as they do not generate there own
light.
It operates on low voltage around 1v-5v and the power required by LCD to
the scatter or absorbs light is very low in the order of the few
micro-watts/cm.
A transmissive LCD has better visual characteristic than a reflective LCD.
The operation of LCD is base on the use of certain organic material, which
retains a regular crystal like structure even when they have been melted.
Nematic and cholestric are to important liquid crystal material used in
display out of these two NLC has a particular crystal structure. The liquid is
normally transparent, but if subjected to a strong electric field, an ion moves
through it and disturbs the well-ordered crystal structure.
The liquid is normally transparent, but if subjected to a strong electric field,
an ion move through it and disturbs the well ordered crystal structure
causing the liquid to polarized and hence turns opaque.
DEPTT. OF ELECTRONICS AND COMMUNICATION ENGG. Page 32
GSM BASED AUTOMATIC DISPLAY TOOLKIT
Basically, LCD consist of thin layer of NLC liquid about 10 micron thick
placed between two glass plates having an electrode at list one electrode is
transparent.
The transmissive type LCD has two transparent glass plates, where as a
reflective type LCD has only one electrode transparent.
2.3.2.1 FEATURES
5 x 8 dots with cursor.
Built-in controller (KS 0066 or Equivalent).
+ 5V power supply (Also available for + 3V).
1/16 duty cycle.
N.V. optional for + 3V power supply.
2.3.2.2 LCD PIN DESCRIPTION
VSS, VDD and VEE
Pin 1 (VSS) is a ground pin and it is certainly needed that this pin should be grounded for
LCD to work properly. VEE and VDD are given +5 vlots normally. However VEE may
have a potentiometer voltage divider network to get the contrast adjusted. But VDD is
always at +5V.
RS, R/W and EN
These three pins are numbered 4, 5 and 6 as shown above. RS is used to make the selection
between data and command register. For RS=0, command register is selected and for RS=1
data register is selected. R/W gives you the choice between writing and reading. If set
(R/W=1) reading is enabled. R/W=0 when writing.
DEPTT. OF ELECTRONICS AND COMMUNICATION ENGG. Page 33
GSM BASED AUTOMATIC DISPLAY TOOLKIT
Enable pins is used by the LCD to latch information presented to its data pins. When data
is supplied to data pins, a high to low pulse must be applied to this pin in-order for the
LCD to latch in the data present at the data pins. It may be noted here that the pulse must
be of minimum 450ns wide.
D0-D7
The 8-bit data pins, D0-D7, are used to send information to the LCD or read the contents
of LCD's internal register.
Table 2.4 Pin Description
DEPTT. OF ELECTRONICS AND COMMUNICATION ENGG. Page 34
GSM BASED AUTOMATIC DISPLAY TOOLKIT
2.3.2.3 LCD CODES
Table 2.5 LCD Codes
DEPTT. OF ELECTRONICS AND COMMUNICATION ENGG. Page 35
GSM BASED AUTOMATIC DISPLAY TOOLKIT
2.3.2.4 16*2 CHARACTER LCD
Table 2.6 Character LCD
2.3.3 GSM MODULE
Fig 2.11 GSM Module
DEPTT. OF ELECTRONICS AND COMMUNICATION ENGG. Page 36
GSM BASED AUTOMATIC DISPLAY TOOLKIT
The GSM module is a GSM terminal for transmitting data, faxes and SMS (short
message service) text messages in GSM networks (GSM = global system for
mobile communication).
GSM modules are similar to modems but there is one difference –A GSM Modem
is an external equipment where as a GSM Module is a module that can be
integrated within an equipment.
When the GSM Module M1 is registered in the network, it serves as a standard
modem for fax and data transmission for a computer connected to the V.24
interface. Special AT+C commands as per GSM 07.07 or GSM 07.05 for
controlling GSM-related functions (PIN entry, network selection, etc.) and for the
short message service are available via the V.24 interface.
2.3.3.1 The GSM Module comprises the following components
• GSM transceiver.
• Data and power supply unit.
• Serial interface (V.24) for data transmission and control.
• Manufacturer-specific interface for DC power supply, external antenna and audio signals.
2.3.3.2 The GSM module offers the advantages
Ultra small size (22x22x3 mm), lightweight (3.2 g) and easy to integrate.
Low power consumption.
R&TTE type approval plus CE, GCF, FCC, PTCRB, IC.
Full RS232 on CMOS level with flow control (RX, TX, CTS, RTS, CTS, DTR,
DSR, DCD, RI).
Embedded TCP/IP Stack UDP/IP Stack , Embedded FTP and SMTP Client.
High performance on low price.
2.3.3.3 INTERFACES
Power supply nominal 3,8 V.
10 general purposes I/O ports and serial bi-directional bus on CMOS 2,8 V.
External SIM.
DEPTT. OF ELECTRONICS AND COMMUNICATION ENGG. Page 37
GSM BASED AUTOMATIC DISPLAY TOOLKIT
Analogue audio for microphone, speaker and hands free set plus digital voice
interface.
RS232 on CMOS 2,8 V (One RS232 (2,8V) with flow control (RX, TX, CTS, RTS,
CTS, DTR, DSR, DCD, RI), baud rate 300 - 115.200 bps, auto bauding 1200 -
57.600 bps.
50 Ohm antenna connector.
2.3.3.4 The GSM Module offers the following features
Short message service mobile originated (SMS MO, TS22).
Short message service mobile terminated (SMS MT, TS21).
SIM Phonebook management.
Fixed Dialling Number (FDN).
SIM Toolkit class 2
Real time clock
Alarm management.
2.4 SUBSCRIBER IDENTITY MODULE (SIM)
Fig 2.12 BSNL SIM
Simcom offers this information as a service to its customers, to support application
and engineering efforts that use Simcom products. The information provided is
based upon requirements specifically provided to Simcom by the customers.
Simcom has not undertaken any independent search for additional relevant
information, including any information that may be in the customer’s possession.
DEPTT. OF ELECTRONICS AND COMMUNICATION ENGG. Page 38
GSM BASED AUTOMATIC DISPLAY TOOLKIT
The GSM Module M1 must have a SIM card to operate in the GSM network. To
install this card, press the yellow button to eject the carrier and insert the SIM in the
carrier. Then push the carrier into the housing, making sure that it locks into place.
A subscriber identity module or subscriber identification module (SIM) is an
integrated circuit that securely stores the International Mobile Subscriber Identity
(IMSI) and the related key used to identify and authenticate subscribers on mobile
telephony devices (such as mobile phones and computers).
There are three operating voltages for SIM cards: 5 V, 3 V and 1.8 V. The
operating voltage of the majority of SIM cards launched before 1998 was 5 V. SIM
cards produced subsequently are compatible with 3 V and 5 V. Modern cards
support 5 V, 3 V and 1.8 V.
The microcontrollers used for SIM cards come in different configurations. The
typical ROM size is between 64 KB and 512 KB, typical RAM size is between 1
KB and 8 KB, and typical EEPROM size is between 16 KB and 512 KB.
The ROM contains the operating system of the card and might contain applets
where the EEPROM contains the so called Personalisation, which consists of
security keys, phone book, SMS settings, etc., and operating system patches.
SIM cards store network-specific information used to authenticate and identify
subscribers on the network. The most important of these are the ICCID, IMSI,
Authentication Key (Ki), Local Area Identity (LAI) and Operator-Specific
Emergency Number.
The SIM also stores other carrier-specific data such as the SMSC (Short Message
Service Center) number, Service Provider Name (SPN), Service Dialing Numbers
(SDN), Advice-Of-Charge parameters and Value Added Service (VAS)
applications.SIM cards can come in at least two capacity types: 32 KB and 64 KB.
Both allow a maximum of 250 contacts to be stored on the SIM, but while the 32
KB has room for 33 mobile network codes (MNCs) or "network identifiers", the 64
KB version has room for 80 MNCs.
DEPTT. OF ELECTRONICS AND COMMUNICATION ENGG. Page 39
GSM BASED AUTOMATIC DISPLAY TOOLKIT
2.4.1 SIM300 KEY FEATURES
DEPTT. OF ELECTRONICS AND COMMUNICATION ENGG. Page 40
GSM BASED AUTOMATIC DISPLAY TOOLKIT
Table 2.7 SIM300 Key Features
2.5 FEMALE 9 PIN PLUG
There are different types of connectors required for serial communication like 9 or 25 pin
female and male plug etc.Serial communication is a way enables different equipments to
communicate with their outside world. It is called serial because the data bits will be sent
in a serial way over a single line.
A personal computer has a serial port known as communication port or COM Port used to
connect a modem for example or any other device, there could be more then one COM
Port in a PC.
Serial ports are controlled by a special chip called UART (Universal Asynchronous
Receiver Transmitter). Different applications use different pins on the serial port and this
basically depend of the functions required.
DEPTT. OF ELECTRONICS AND COMMUNICATION ENGG. Page 41
GSM BASED AUTOMATIC DISPLAY TOOLKIT
Serial communication has some advantages over the parallel communication. One of the
advantages is transmission distance, serial link can send data to a remote device more far
then parallel link. Also the cable connection of serial link is simpler then parallel link and
uses less number of wires.
Serial link is used also for Infrared communication, now many devices such as laptops &
printers can communicate via inferred link.
Types of connectors
There are two sizes of connectors 9 pin and 25 pin, both they called D-Type plug. D-Type
plug could be either Male or Female. Here we will discuss only about the female 9 pin
plug.
2.5.1 PIN DESCRIPTION OF FEMALE 9 PIN PLUG
Fig 2.13 Female 9 Pin Plug
DEPTT. OF ELECTRONICS AND COMMUNICATION ENGG. Page 42
GSM BASED AUTOMATIC DISPLAY TOOLKIT
Table 2.8 Pin description of Female 9 Pin plug
2.5.2 FEATURES OF FEMALE 9 PIN PLUG
Supports PCI bus, Plug and Play.
Provides 1 isolated RS-422/485 port and 1 RS-232 port.
Provides surge protection.
LED diagnostic indicators.
DOS, Windows NT/2K/XP/2003 and Linux driver supported.
2.5.3 ADVANTAGES
Built-in COM-Selector.
Self-Tuner inside.
3KV isolated RS-422/485 port.
Up to 128KB software FIFO for each COM port under Windows.
Short Card Design.
2.6 TRANSFORMER
DEPTT. OF ELECTRONICS AND COMMUNICATION ENGG. Page 43
GSM BASED AUTOMATIC DISPLAY TOOLKIT
Fig 2.14 Transformer
A transformer is a device (that was invented by NIKOLA TESLA) that transfers
electrical energy from one circuit to another through inductively coupled conductors—the
transformer's coils.
A varying current in the first or primary winding creates a varying magnetic flux in the
transformer's core and thus a varying magnetic field through the secondary winding.
This varying magnetic field induces a varying electromotive force (EMF), or "voltage", in
the secondary winding. This effect is called inductive coupling.
If a load is connected to the secondary, current will flow in the secondary winding, and
electrical energy will be transferred from the primary circuit through the transformer to the
load.
In an ideal transformer, the induced voltage in the secondary winding (Vs) is in proportion
to the primary voltage (Vp) and is given by the ratio of the number of turns in the
secondary (Ns) to the number of turns in the primary (Np) as follows:
DEPTT. OF ELECTRONICS AND COMMUNICATION ENGG. Page 44
GSM BASED AUTOMATIC DISPLAY TOOLKIT
By apprpriate selection of the ratio of turns, a transformer thus enables an alternating
current (AC) voltage to be "stepped up" by making Ns greater than Np, or "stepped down"
by making Ns less than Np.
2.6.1 COUPLING BY MUTUAL INDUCTION
A simple transformer consists of two electrical conductors called the primary winding
and the secondary winding. Energy is coupled between the windings by the time-varying
magnetic flux that passes through (links) both primary and secondary windings.
When the current in a coil is switched on or off or changed, a voltage is induced in a
neighboring coil. The effect, called mutual inductance, is an example of electromagnetic
induction
2.6.2 BASIC PRINCIPLES
The transformer is based on two principles: first, that an electric current can produce a
magnetic field (electromagnetism) and second that a changing magnetic field within a coil
of wire induces a voltage across the ends of the coil (electromagnetic induction).
Changing the current in the primary coil changes the magnetic flux that is developed. The
changing magnetic flux induces a voltage in the secondary coil.
Fig 2.15 An ideal transformer
The secondary current arises from the action of the secondary EMF on the load
impedance
DEPTT. OF ELECTRONICS AND COMMUNICATION ENGG. Page 45
GSM BASED AUTOMATIC DISPLAY TOOLKIT
An ideal transformer is shown in the adjacent figure. Current passing through the
primary coil creates a magnetic field. The primary and secondary coils are wrapped
around a core of very high magnetic permeability, such as iron, so that most of the
magnetic flux passes through both the primary and secondary coils. If a load is
connected to the secondary winding, the load current and voltage will be in the
directions indicated, given the primary current and voltage in the directions indicated
(each will be alternating current in practice).
2.6.3 IDEAL POWER EQUATION
Fig 2.16 The ideal transformer as a circuit element
If the secondary coil is attached to a load that allows current to flow, electrical power is
transmitted from the primary circuit to the secondary circuit. Ideally, the transformer is
perfectly efficient. All the incoming energy is transformed from the primary circuit to the
magnetic field and into the secondary circuit. If this condition is met, the input electric
power must equal the output power:
giving the ideal transformer equation
This formula is a reasonable approximation for most commercial built transformers today.
DEPTT. OF ELECTRONICS AND COMMUNICATION ENGG. Page 46
GSM BASED AUTOMATIC DISPLAY TOOLKIT
If the voltage is increased, then the current is decreased by the same factor. The impedance
in one circuit is transformed by the square of the turns ratio.
For example, if an impedance Zs is attached across the terminals of the secondary coil, it
appears to the primary circuit to have an impedance of (Np/Ns)2Zs. This relationship is
reciprocal, so that the impedance Zp of the primary circuit appears to the secondary to be
(Ns/Np)2Zp.
2.6.4 THE UNIVERSAL EMF EQUATION
If the flux in the core is sinusoidal, the relationship for either winding between its number
ofturns, voltage, magnetic flux density and core cross-sectional area is given by the
universal emf equation (from Faraday's law):
Where,
E= is the sinusoidal rms or root mean square voltage of the winding.
f= is the frequency in hertz
N= is the number of turns of wire on the winding
a= is the cross-sectional area of the core in square metres
B =is the peak magnetic flux density in teslas
2.6.5 CLASSIFICATION
Transformers are adapted to numerous engineering applications and may be classified in
many ways:
By power level (from fraction of a volt-ampere(VA) to over a thousand MVA).
By application (power supply, impedance matching, circuit isolation).
By frequency range (power, audio, radio frequency(RF)).
By voltage class (a few volts to about 750 kilovolts).
By cooling type (air cooled, oil filled, fan cooled, water cooled, etc.).
By purpose (distribution, rectifier, arc furnace, amplifier output, etc.).
By ratio of the number of turns in the coils.
DEPTT. OF ELECTRONICS AND COMMUNICATION ENGG. Page 47
GSM BASED AUTOMATIC DISPLAY TOOLKIT
STEP-UP
The secondary has more turns than the primary.
STEP-DOWN
The secondary has fewer turns than the primary.
ISOLATING
Intended to transform from one voltage to the same voltage. The two coils have
approximately equal numbers of turns, although often there is a slight difference in the
number of turns, in order to compensate for losses (otherwise the output voltage would be
a little less than, rather than the same as, the input voltage).
VARIABLE
The primary and secondary have an adjustable number of turns which can be
selected without reconnecting the transformer.
2.7 MAGNET MOUNT ANTENNA
Magnet Mount or Mag Mount Antennas stick to the sheet metal of your vehicle's roof or
trunk via a strong circular magnet and utilizes the body metal as an integral part of the
antenna (ground plane). The antenna pictured to the right is a Dual Band Mag Mount
antenna.
These antennas work particularly well for people who have several vehicles or do not want
to install an antenna either permanently or semi-permanently on their vehicle.
Installation of these antennas is as simple as setting the antenna on the trunk lid or roof
and running the included cable in through the trunk lid, door or window.
Care must be taken to run the cable in such a way so that water cannot get through where
the cable enters the vehicle interior. Also care must be taken not to crush or severely bend
the cable.
These antennas can also be used in a home or office but must be applied to a metal surface
(file cabinet, desk or refrigerator are some examples) in order to work effectively.
DEPTT. OF ELECTRONICS AND COMMUNICATION ENGG. Page 48
GSM BASED AUTOMATIC DISPLAY TOOLKIT
A ground plane can also be made out of sheet metal (12" Square for 1900 MHz and 28"
Square for 800MHz and Dual Band).
Your local Hardware store carries pieces of sheet metal also known as flashing (for roofs)
that are very inexpensive.
This antenna would be a good choice at home where signal is sometimes good and
sometimes marginal. If reception is not sufficient to make ANY calls, a panel antenna
might be a better solution.
The primary purpose of the magnet antenna mount is to allow the CB’er the means to gain
temporary or emergency communications capability.
The fact that the user doesn’t need to drill holes in the vehicle should be of secondary
importance.Magnetic mounts should always be treated as a temporary solution to an
immediate or short-term communications need.
If you don’t plan to use your CB on a regular basis, don’t want to drill holes in your
vehicle for permanent mounts, or don’t expect the maximum performance from your
equipment, than a magnetic mount may be all you need.
But remember, in spite of their convenience, a magnetic mount antenna will rarely meet
the performance that is realized from a properly installed permanent antenna. However, for
short-range caravan type communications or emergency use, magnetic mount antennas are
sufficient.
DEPTT. OF ELECTRONICS AND COMMUNICATION ENGG. Page 49
GSM BASED AUTOMATIC DISPLAY TOOLKIT
Fig 2.17 Magnet Mount Anteena BMAX824/1850
DEPTT. OF ELECTRONICS AND COMMUNICATION ENGG. Page 50
GSM BASED AUTOMATIC DISPLAY TOOLKIT
DEPTT. OF ELECTRONICS AND COMMUNICATION ENGG. Page 51
2.7.1 GENERAL CONSIDERATIONS
1. Like all other transmit antennas, those mounted on magnet mounts must be tuned on
the vehicle in the location that it will always be used. If you tune the antenna in the
middle of the roof then decide to use it on the hood or truck, or a different vehicle, it
will require re-tuning at its new location.
2. Always place your magnet on the flattest surface available.
3. Do not abuse the coax cable. It is extremely important. Sharp bends, tight pinches and
holes rubbed through outer jacket will affect performance.
4. Always place your magnet on a clean, dry surface.
5. If avoidable, do not use on a vinyl roof. (Adds capacitance and diminishes holding
strength).
6. Never leave the mount in one location for extended periods of time. (The vehicle
paint will fade at various rates and moisture under mount can cause rust to form under
the painted surface.)
7. If you drop a ferrite magnet on a hard surface the magnetic strength may be reduced,
or the material could shatter into many pieces.
8. Magnet mounts rely on high resistance, capacitance grounding. If you use power
amplification, there is a good chance that heat will discolor the vehicles paint. We do
not recommend the use of amplifiers with any magnet-mounted antenna.
9. At highway speeds there are considerable forces acting upon the mount. Even if the
antenna is holding fast, a side burst of air from a passing 18-wheeler can hit the
antenna with a force from another direction causing it to loose its grip. For that
reason, it is always a good idea to have a spring between the antenna and the magnet
mount.
10. When removing the magnetic mount from the vehicle, do not slide it to the edge to
make it more convenient. Dirt between the magnet and the vehicle paint will surely
leave scratches.
11. Never place your magnet mount near your audio and/or video tapes, or computer
disks of any type. The strong magnetic field will destroy them. And, if you want to
wreck the magnetic strip on your credit card, set them on the magnet for 1 second or
more.
GSM BASED AUTOMATIC DISPLAY TOOLKIT
2.7.2 FEATURES
Molded polymer base provides ruggedness and durability in harsh mobile
environments.
Wideband performance (Wi-Fi and WiMAX models) provide coverage of 2.2 GHz
to 2.9GHz frequencies without tuning. WiMAX model covers 2.3-3.8 GHz
frequencies.
3 dB or 5 dB models available for most frequency ranges.
Most models available in bright chrome or black finish.
Antenna is ready to install; no rod cutting is required (unless otherwise noted).
Designed to mate with all 1-1/8”-18 thread mounts, including 3/4” mounts.
Spring-loaded gold plated contact pin.
2.7.3 TECHNICAL DATA
Table 2.9 Technical data of magnet mount antenna
DEPTT. OF ELECTRONICS AND COMMUNICATION ENGG. Page 52
GSM BASED AUTOMATIC DISPLAY TOOLKIT
2.8 POWER RESET BUTTON
A Power-ON Reset allows togenerate a reset signal after a power supply level detection.
Fig 2.18 Power ON RESET
The output reset signal is low-active and must be efficient during a precise time (Trst)
after the input signal level detection. The Power-ON Reset must detect a voltage level
smaller than a constant value and generate the reset signal at every moment. This circuit is
only supplied by the general power supply, so by the same voltage on which we have to
perform the detection.
In our case, the power supply voltage is 5V and the reference voltage (Vref.) is 3,75V. As
soon as the power supply voltage (Vsupply) is superior to Vref, the reset output voltage
stays at a 0V level during the time Trst needed by the user; then, it gets to the high digital
voltage value (here 5V). The same reset will occur for a glitch. The reset time Trst is
chosen using external components.
DEPTT. OF ELECTRONICS AND COMMUNICATION ENGG. Page 53
GSM BASED AUTOMATIC DISPLAY TOOLKIT
2.8.1 DISCHARGE
To have a constant reset time, especially for re-reset conditions, we have to discharge very
quickly the RC bridge capacitor. So, we use a huge PMOS transistor as a switch, 1rter and
a small NMOS switch which allows to empty the capacitor at the beginning of the cycle
(when the power supply voltage is getting high)because when Vcc is inferior to the PMOS
threshold voltage, the PMOS doesn’t empty the full charge.
2.9 LIGHT EMITTING DIODE
A light-emitting diode (LED) is a semiconductor light source.[3] LEDs are used as
indicator lamps in many devices and are increasingly used for other lighting. Introduced as
a practical electronic component in 1962,[4] early LEDs emitted low-intensity red light, but
modern versions are available across the visible, ultraviolet, and infrared wavelengths,
with very high brightness.
When a light-emitting diode is forward-biased (switched on), electrons are able to
recombine with electron holes within the device, releasing energy in the form of photons.
This effect is called electroluminescence and the color of the light (corresponding to the
energy of the photon) is determined by the energy gap of the semiconductor.
LEDs are often small in area (less than 1 mm2), and integrated optical components may be
used to shape its radiation pattern. LEDs present many advantages over incandescent light
sources including lower energy consumption, longer lifetime, improved robustness,
smaller size, and faster switching.Light-emitting diodes are used in applications as diverse
as aviation lighting, automotive lighting, advertising, general lighting, and traffic signals.
LEDs have allowed new text, video displays, and sensors to be developed, while their high
switching rates are also useful in advanced communications technology.
Fig 2.19 Symbol of LED
DEPTT. OF ELECTRONICS AND COMMUNICATION ENGG. Page 54
GSM BASED AUTOMATIC DISPLAY TOOLKIT
Fig 2.20 LED
2.9.1 THE INNER WORKINGS OF AN LED
The LED consists of a chip of semiconducting material doped with impurities to create a p-
n junction. As in other diodes, current flows easily from the p-side, or anode, to the n-side,
or cathode, but not in the reverse direction. Charge-carriers—electrons and holes—flow
into the junction from electrodes with different voltages. When an electron meets a hole, it
falls into a lower energy level, and releases energy in the form of a photon.
The wavelength of the light emitted, and thus its color depends on the band gap energy of
the materials forming the p-n junction. In silicon or germanium diodes, the electrons and
holes recombine by a non-radiative transition, which produces no optical emission,
because these are indirect band gap materials. The materials used for the LED have a direct
band gap with energies corresponding to near-infrared, visible, or near-ultraviolet light.
LED development began with infrared and red devices made with gallium arsenide.
Advances in materials science have enabled making devices with ever-shorter
wavelengths, emitting light in a variety of colors.
LEDs are usually built on an n-type substrate, with an electrode attached to the p-type
layer deposited on its surface. P-type substrates, while less common, occur as well. Many
commercial LEDs, especially GaN/InGaN, also use sapphire substrate.
Most materials used for LED production have very high refractive indices. This means that
much light will be reflected back into the material at the material/air surface interface.
DEPTT. OF ELECTRONICS AND COMMUNICATION ENGG. Page 55
GSM BASED AUTOMATIC DISPLAY TOOLKIT
Thus, light extraction in LEDs is an important aspect of LED production, subject to much
research and development.
Fig 2.21 The inner workings of an LED
2.9.2 ADVANTAGES
Efficiency: LEDs emit more light per watt than incandescent light bulbs.[93] Their
efficiency is not affected by shape and size, unlike fluorescent light bulbs or tubes.
Color: LEDs can emit light of an intended color without using any color filters as
traditional lighting methods need. This is more efficient and can lower initial costs.
Size: LEDs can be very small (smaller than 2 mm2]) and are easily populated onto
printed circuit boards.
On/Off time: LEDs light up very quickly. A typical red indicator LED will achieve
full brightness in under a microsecond.[95] LEDs used in communications devices
can have even faster response times.
Cycling: LEDs are ideal for uses subject to frequent on-off cycling, unlike
fluorescent lamps that fail faster when cycled often, or HID lamps that require a
long time before restarting.
Dimming: LEDs can very easily be dimmed either by pulse-width modulation or
lowering the forward current.
DEPTT. OF ELECTRONICS AND COMMUNICATION ENGG. Page 56
GSM BASED AUTOMATIC DISPLAY TOOLKIT
Cool light: In contrast to most light sources, LEDs radiate very little heat in the
form of IR that can cause damage to sensitive objects or fabrics. Wasted energy is
dispersed as heat through the base of the LED.
Slow failure: LEDs mostly fail by dimming over time, rather than the abrupt
failure of incandescent bulbs.
Lifetime: LEDs can have a relatively long useful life. One report estimates 35,000
to 50,000 hours of useful life, though time to complete failure may be longer.
Fluorescent tubes typically are rated at about 10,000 to 15,000 hours, depending
partly on the conditions of use, and incandescent light bulbs at 1,000–2,000 hours.
Shock resistance: LEDs, being solid state components, are difficult to damage
with external shock, unlike fluorescent and incandescent bulbs, which are fragile.
Focus: The solid package of the LED can be designed to focus its light.
Incandescent and fluorescent sources often require an external reflector to collect
light and direct it in a usable manner
2.9.3 APPLICATIONS
In general, all the LED products can be divided into two major parts, the public lighting
and indoor lighting. LED uses fall into four major categories:
Visual signals where light goes more or less directly from the source to the human
eye, to convey a message or meaning.
Illumination where light is reflected from objects to give visual response of these
objects.
Measuring and interacting with processes involving no human vision.[109]
Narrow band light sensors where LEDs operate in a reverse-bias mode and respond
to incident light, instead of emitting light.
DEPTT. OF ELECTRONICS AND COMMUNICATION ENGG. Page 57
GSM BASED AUTOMATIC DISPLAY TOOLKIT
2.10 DIODE
Fig 2.22 Diode 1N4007
In electronics, a diode is a type of two-terminal electronic component with nonlinear
resistance and conductance (i.e., a nonlinear current–voltage characteristic), distinguishing
it from components such as two-terminal linear resistors which obey Ohm’s law. A
semiconductor diode, the most common type today, is a crystalline piece of
semiconductor material connected to two electrical terminals. A vacuum tube diode (now
rarely used except in some high-power technologies) is a vacuum tube with two electrodes:
a plate and a cathode.
The most common function of a diode is to allow an electric current to pass in one
direction (called the diode’s forward direction), while blocking current in the opposite
direction (the reverse direction). Thus, the diode can be thought of as an electronic version
of a check valve. This unidirectional behavior is called rectification, and is used to convert
alternating current to direct current, and to extract modulation from radio signals in radio
receivers—these diodes are forms of rectifiers.
However, diodes can have more complicated behavior than this simple on–off action.
Semiconductor diodes do not begin conducting electricity until a certain threshold voltage
is present in the forward direction (a state in which the diode is said to be forward-biased).
The voltage drop across a forward-biased diode varies only a little with the current, and is
a function of temperature; this effect can be used as a temperature sensor or voltage
reference.
FEATURES
• Low forward voltage drop.
• High surge current capability.
DEPTT. OF ELECTRONICS AND COMMUNICATION ENGG. Page 58
GSM BASED AUTOMATIC DISPLAY TOOLKIT
2.11 CAPACITOR
It is an electronic component whose function is to accumulate charges and then release it.
Fig 2.23 Capacitor
Capacitors are of two types: - (1) fixed type like ceramic, polyester, electrolytic
capacitors-these names refer to the material they are made of aluminium foil. (2) Variable
type like gang condenser in radio or trimmer. In fixed type capacitors, it has two leads and
its value is written over its body and variable type has three leads. Unit of measurement of
a capacitor is farad denoted by the symbol F.
It is a very big unit of capacitance. Small unit capacitor are pico-farad denoted by pf
(Ipf=1/1000,000,000,000 f) Above all, in case of electrolytic capacitors, it’s two terminal
are marked as (-) and (+) so check it while using capacitors in the circuit in right direction.
Mistake can destroy the capacitor or entire circuit in operational.
In this project two types of capacitors are used:
Ceramic Capacitor (22 pF, 15pF, 47pF)
Electrolytic Capacitor (10 microF)
2.11.1 CERAMIC CAPACITOR
Fig 2.24 Ceramic Capacitor
DEPTT. OF ELECTRONICS AND COMMUNICATION ENGG. Page 59
GSM BASED AUTOMATIC DISPLAY TOOLKIT
In electronics, a ceramic capacitor is a capacitor constructed of alternating layers of metal
and ceramic, with the ceramic material acting as the dielectric. The temperature coefficient
depends on whether the dielectric is Class 1 or Class 2. A ceramic capacitor (especially the
class 2) often has high dissipation factor, high frequency coefficient of dissipation.
2.11.2 CLASSES OF CERAMIC CAPACITORS
Class I capacitors: accurate, temperature-compensating capacitors. They are the
most stable over voltage, temperature, and to some extent, frequency. They also
have the lowest losses. On the other hand, they have the lowest volumetric
efficiency. A typical class I capacitor will have a temperature coefficient of 30
ppm/°C. This will typically be fairly linear with temperature. These also allow for
high Q filters—a typical class I capacitor will have a dissipation factor of 0.15%.
Very high accuracy (~1%) class I capacitors are available (typical ones will be 5%
or 10%). The highest accuracy class 1 capacitors are designated C0G or NP0.
Class II capacitors: better volumetric efficiency, but lower accuracy and stability.
A typical class II capacitor may change capacitance by 15% over a −55 °C to 85 °C
temperature range. A typical class II capacitor will have a dissipation factor of
2.5%. It will have average to poor accuracy (from 10% down to +20/-80%).
Class III capacitors: high volumetric efficiency, but poor accuracy and stability. A
typical class III capacitor will change capacitance by -22% to +56% over a
temperature range of 10 °C to 55 °C. It will have a dissipation factor of 4%. It will
have fairly poor accuracy (commonly, 20%, or +80/-20%). These are typically used
for decoupling or in other power supply applications.
2.11.3 ELECTROLYTIC CAPACITOR
An electrolytic capacitor is a type of capacitor that uses an electrolyte (an ionic
conducting liquid) as one of its plates to achieve a larger capacitance per unit volume than
other types, but with performance disadvantages.
DEPTT. OF ELECTRONICS AND COMMUNICATION ENGG. Page 60
GSM BASED AUTOMATIC DISPLAY TOOLKIT
All capacitors conduct alternating current (AC) and block direct current (DC) and can be
used, amongst other applications, to couple circuit blocks allowing AC signals to be
transferred while blocking DC power, to store energy, and to filter signals according to
their frequency.
The large capacitance of electrolytic capacitors makes them particularly suitable for
passing or bypassing low-frequency signals and storing large amounts of energy. They are
widely used in power supplies and for decoupling unwanted AC components from DC
power connections.
Fig 2.25 Electrolytic Capacitor
2.12 CRYSTAL
Crystal has the property of durability, reliability, easy installation, low maintenance,
precision of frequency and high end output frequencies.
Fig 2.26 Quartz Crystal
DEPTT. OF ELECTRONICS AND COMMUNICATION ENGG. Page 61
GSM BASED AUTOMATIC DISPLAY TOOLKIT
2.12.1 FEATURES
Nominal frequency 1.000~125.000MHz
Mode of vibration Fundament 1.0~30.0MHz 3rd Overtone 24.0~60.0MHz
60.0~125.0MHz
CRT type AT
Frequency tolerance + -20ppm, + -30ppm, + -50ppm
Frequency stability + -20ppm, + -30ppm, + -50ppm
Load capacitance 8pf~33pf, series
Shunt capacitance 7.0pf max
Drive level 0.01~2.0mw max
Insulation resistance 500MΩMin/100+ -15VDC
2.13 PRINTED CIRCUIT BOARD (PCB)
A printed circuit board, or PCB, is used to mechanically support and electrically connect
electronic components using conductive pathways, tracks or signal traces etched from
copper sheets laminated onto a non-conductive substrate. It is also referred to as printed
wiring board (PWB) or etched wiring board.
A PCB populated with electronic components is a printed circuit assembly (PCA), also
known as a printed circuit board assembly or PCB Assembly (PCBA). Printed circuit
boards are used in virtually all but the simplest commercially produced electronic devices.
Alternatives to PCBs include wire wrap and point-to-point construction. PCBs are often
less expensive and more reliable than these alternatives, though they require more layout
effort and higher initial cost.
PCBs are much cheaper and faster for high-volume production since production and
soldering of PCBs can be done by automated equipment. Much of the electronics
industry’s PCB design, assembly, and quality control needs are set by standards that are
published by the IPC organization.Conducting layers are typically made of thin copper
foil.
DEPTT. OF ELECTRONICS AND COMMUNICATION ENGG. Page 62
GSM BASED AUTOMATIC DISPLAY TOOLKIT
Insulating layers dielectric are typically laminated together with epoxy resin prepreg.The
board is typically coated with a solder mask that is green in color. Other colors that are
normally available are blue, black, white and red. There are quite a few different dielectrics
that can be chosen to provide different insulating values depending on the requirements of
the circuit.
Fig 2.27 PCB
The vast majority of printed circuit boards are made by bonding a layer of copper over the
entire substrate, sometimes on both sides, (creating a “blank PCB”) then removing
unwanted copper after applying a temporary mask (e.g., by etching), leaving only the
desired copper traces.
A few PCBs are made by adding traces to the bare substrate (or a substrate with a very thin
layer of copper) usually by a complex process of multiple electroplating steps. The PCB
DEPTT. OF ELECTRONICS AND COMMUNICATION ENGG. Page 63
GSM BASED AUTOMATIC DISPLAY TOOLKIT
manufacturing method primarily depends on whether it is for production volume or
sample/prototype quantities. Double-sided boards or multi-layer boards use plated-through
holes, called vias, to connect traces on either side of the substrate.
2.13.1 LARGE VOLUME
Silk screen printing–the main commercial method.
Photographic methods–used when fine line widths are required.
2.13.2 SMALL VOLUME
Print onto transparent film and use as photomask along with photo-sensitized
boards. (i.e., pre-sensitized boards), then etch. (Alternatively, use a film photo
plotter).
Laser resist ablation: Spray black paint onto copper clad laminate, place into CNC
laser plotter. The laser raster-scans the PCB and ablates (vaporizes) the paint where
no resist is wanted. Etch. (Note: laser copper ablation is rarely used and is
considered experimental.)
2.14 RESISTOR (10KΩ ,11kΩ)
Resistance is the opposition of a material to the current. It is measured in Ohms (Ω). All
conductors represent a certain amount of resistance, since no conductor is 100% efficient.
To control the electron flow (current) in a predictable manner, we use resistors.
Fig 2.28 Symbol of Resistor
Electronic circuits use calibrated lumped resistance to control the flow of current. Broadly
speaking, resistor can be divided into two groups viz. fixed & adjustable (variable)
resistors. In fixed resistors, the value is fixed & cannot be varied. In variable resistors, the
resistance value can be varied by an adjuster knob.
It can be divided into (a) Carbon composition (b) Wire wound (c) Special type.
DEPTT. OF ELECTRONICS AND COMMUNICATION ENGG. Page 64
GSM BASED AUTOMATIC DISPLAY TOOLKIT
The most common type of resistors used in our projects is carbon type. The resistance
value is normally indicated by colour bands. Each resistance has four colours, one of the
band on either side will be gold or silver, this is called fourth band and indicates the
tolerance, others three band will give the value of resistance.
For example if a resistor has the following marking on it say red, violet, gold. Comparing
these coloured rings with the colour code, its value is 27000 ohms or 27 kilo ohms and its
tolerance is ±5%. Resistor comes in various sizes (Power rating). The bigger, the size, the
more power rating of ¼ watts. The four colour rings on its body tells us the value of
resistor value as given below.
2.14.1 COLOURS CODE
Black-----------------------------------------------------0
Brown----------------------------------------------------1
Red-------------------------------------------------------2
Orange---------------------------------------------------3
Yellow---------------------------------------------------4
Green-----------------------------------------------------5
Blue-------------------------------------------------------6
Violet-----------------------------------------------------7
Grey------------------------------------------------------8
White-----------------------------------------------------9
The first rings give the first digit. The second ring gives the second digit. The third ring
indicates the number of zeroes to be placed after the digits. The fourth ring gives tolerance
(gold ±5%, silver ± 10%, No colour ± 20%).
Fig 2.29 Resistor
DEPTT. OF ELECTRONICS AND COMMUNICATION ENGG. Page 65
GSM BASED AUTOMATIC DISPLAY TOOLKIT
2.15 OTHER HARDWARE REQUIRMENTS
2.15.1 SERIAL PORT CABLE
The serial port cable is used to connect computer from 9 pin plug.
A null modem cable will enable you to connect two computers together for serial
communications It is a particularly designed cable that permits anyone to connect two
computers directly to each other via their communications ports called RS-232 ports.
Serial communications with RS232 is one of the oldest and most widely spread
communication methods in computer realm.
Null modems are specially helpful with portable computers because they enable the
portable computer to exchange data with a bigger machine.
Null modem cables have the TD (Transmit Data) and RD ( Receive Data) lines crossed
over, permitting information to be sent from one computer to the other.
They are similar to a crossover cable where it is the CTS (clear to send) and RTS (ready to
send) lines are crossed over. Null-modem cables are particularly used for serial port
connections.
Fig 2.30 Serial Port Cable
DEPTT. OF ELECTRONICS AND COMMUNICATION ENGG. Page 66
GSM BASED AUTOMATIC DISPLAY TOOLKIT
2.15.2 COAXIAL CABLE
Coaxial cable is used to provide connection to antenna.
Coaxial cables are a type of cable that is used by cable TV and that is common for data
communications.
Taking a round cross-section of the cable, one would find a single center solid wire
symmetrically surrounded by a braided or foil conductor. Between the center wire and foil
is a insulating dielectric. This dielectric has a large affect on the fundamental
characteristics of the cable. In this lab, we show the how the permittivity and permeability
of the dielectric contributes to the cable’s inductance and capacitance. Also, these values
affect how quickly electrical data is travels through the wire.
Data is transmitted through the center wire, while the outer braided layer serves as a line to
ground. Both of these conductors are parallel and share the same axis. This is why the wire
is called coaxial!
Just like all electrical components, coaxial cables have a characteristic impedance. This
impedance depends on the dielectric material and the radii of each conducting material. As
shown in this lab, the impedance affects how the cable interacts with other electrical
components.
Fig 2.31 Coaxial Cable
DEPTT. OF ELECTRONICS AND COMMUNICATION ENGG. Page 67
GSM BASED AUTOMATIC DISPLAY TOOLKIT
2.15.3 POWER SUPPLY
Power supply is a reference to a source of electrical power. A device or system that
supplies electrical or other types of energy to an output load or group of loads is called a
power supply unit or PSU. The term is most commonly applied to electrical energy
supplies, less often to mechanical ones, and rarely to others.
Fig 2.32 Circuit of Power Supply
2.15.3.1 ELECTRICAL POWER SUPPLIES
This term covers the power distribution system together with any other primary or
secondary sources of energy such as:
Conversion of one form of electrical power to another desired form and voltage.
This typically involves converting 120 or 240 volt AC supplied by a utility
company (see electricity generation) to a well-regulated lower voltage DC for
electronic devices. For examples, see switched-mode power supply, linear
regulator, rectifier and inverter (electrical).
Batteries
Chemical fuel cells and other forms of energy storage systems
Solar power
Generators or alternators (particularly useful in vehicles of all shapes and sizes,
where the engine has torque to spare, or in semi-portable units containing an
internal combustion engine and a generator) (For large-scale power supplies, see
electricity generation.) Low voltage, low power DC power supply units are
commonly integrated with the devices they supply, such as computers and
household electronics.
DEPTT. OF ELECTRONICS AND COMMUNICATION ENGG. Page 68
GSM BASED AUTOMATIC DISPLAY TOOLKIT
Constraints that commonly affect power supplies are the amount of power they can supply,
how long they can supply it without needing some kind of refueling or recharging, how
stable their output voltage or current is under varying load conditions, and whether they
provide continuous power or pulses.
The regulation of power supplies is done by incorporating circuitry to tightly control the
output voltage and/or current of the power supply to a specific value. The specific value is
closely maintained despite variations in the load presented to the power supply’s output, or
any reasonable voltage variation at the power supply’s input. This kind of regulation is
commonly categorized as a Stabilized power supply.
TYPES OF POWER SUPPLY
There are many types of power supply. Most are designed to convert high voltage AC
mains electricity to a suitable low voltage supply for electronics circuits and other devices.
A power supply can by broken down into a series of blocks. For example a 5V regulated
supply:
Fig 2.33 Block Diagram of Regulated Power Supply
Each of the blocks is described in more detail below:
Transformer — steps down high voltage AC mains to low voltage AC.
Rectifier — converts AC to DC, but the DC output is varying.
Smoothing — smoothes the DC from varying greatly to a small ripple.
Regulator — eliminates ripple by setting DC output to a fixed voltage.
DEPTT. OF ELECTRONICS AND COMMUNICATION ENGG. Page 69
GSM BASED AUTOMATIC DISPLAY TOOLKIT
CONNECTIONS
AND
INTERFACING
DEPTT. OF ELECTRONICS AND COMMUNICATION ENGG. Page 70
GSM BASED AUTOMATIC DISPLAY TOOLKIT
3.1 CIRCUIT DIAGRAM
Fig 3.1 Circuit Diagram of GSM Based SMS Driven Automatic Display Toolkit
DEPTT. OF ELECTRONICS AND COMMUNICATION ENGG. Page 71
GSM BASED AUTOMATIC DISPLAY TOOLKIT
3.2 CONNECTING MICROCONTROLLER AND COMPUTER WITH USB COMMUNICATION
There are many advantages to connecting hardware via the Universal Serial Bus (USB),
but there are also many obstacles to be overcome. In this series of articles, we provide you
with a map to help you find your way along the stony path of developing USB
applications.
DIY hardware for the PC is usually connected to the serial RS232 interface. After several
decades of use, this interface is very well documented and easy to use. Of course, it also
has certain disadvantages One of these is that you can only connect a device to it before
booting the PC, and another is that powering an attached circuit from the serial interface is
awkward (and only a small amount of power can be drawn this way).
The USB interface is free of these disadvantages. However, most users – including
experienced PC hobbyists – know little or nothing about the USB interface. The objective
of this series of article is to enable you to connect homemade USB devices to a PC. The
key factor here is that almost everything you need can be downloaded from the Internet for
free.
3.2.1 THERE ARE THREE ELEMENTS TO THE DEVELOPMENT OF A
PERIPHERAL USB CIRCUIT:
1. The hardware and a program that runs in the USB IC.
2. A program that communicates with the USB IC and displays responses on the screen.
3. A device driver (SYS file) that provides communication between the USB port and the
program.
3.3 CONNECTING MICROCONTROLLER AND MOBILE PHONES
In communicating the cell phone / cell phone with the microcontroller to be used as a
remote-controlled device required an interface that can synchronize the two devices so
they can exchange data. Interface system in this study using phone data port
communication lines embedded on the bottom of the phone to be able to communicate
with a microcontroller series, the serial communication there are two main points that must
DEPTT. OF ELECTRONICS AND COMMUNICATION ENGG. Page 72
GSM BASED AUTOMATIC DISPLAY TOOLKIT
be adjusted i.e: stress levels and speed data rate (baud rate), after the second this is then
adjusted so that both devices can communicate with these devices can be used as a remote-
controlled device.
It was made by using micro controller as the main module, which will read incoming SMS
to your mobile phone as an order issued by the control of the realization of micro-, and
ordered the phone to send SMS reply to the mobile sender’s output status. In this script you
can use almost any type of mobile phone data cable original specifications which are
connected in series with the instrument, while the controller can be used for any phone
with SMS facility.
Remote control technology has been developed by using various transmission media.
Some of them are remote control using infrared media, radio, internet and phone lines.
Remote control system via the telephone line has an advantage in terms of range and
practicality compared with other media.
The presence of mobile phone (cellular) or mobile phones that have been known and used
a lot of people that are able to communicate wherever they are without being limited by
space and the span length of the cord could be a solution for the needs of remote control
(remote control) as was described above.
One of the most popular cell phone function is to send and receive SMS. SMS is very
suitable for real time control system for wireless data transfer speed, efficiency and breadth
of coverage, but the excess mobile phone with its SMS facility is still to be connected to a
control device to be able to control the on / off electrical devices remotely.
We have one of the control device which is practical and widely used microcontroller is a
chip that serves as an electronic circuit and the controller can store the program inside. The
major advantage is tersediannya RAM and microcontroller I / O support, so have a very
compact size and more flexibility to be connected and controlling
DEPTT. OF ELECTRONICS AND COMMUNICATION ENGG. Page 73
GSM BASED AUTOMATIC DISPLAY TOOLKIT
Fig 3.2 Block Diagram Mobile Phone and Microcontroller Communication
3.4 DESIGN OF CONTROL UNIT MICROCONTROLLER
Microcontroller is the main module in this case the micro controller strand consists of
microcontroller IC AT89S51, AT89S51 micro controller oscillator strand, strand AT89S51
micro controller reset. Strand consists of a crystal oscillator and two capacitors. This strand
with XTAL1 and XTAL2, used capacitor values of 33 pF and crystal that is used has a
value of 11.0592 MHz. strand has the ability to reset the realization of the power-on reset,
which is also accompanied with the reset button, this strand consists of a capacitor, a
resistor and a push Botton. Value of used 10 UF capacitor resistor values used 8.2 Kohm.
PORT 2 of the microstructure is used as the output of the tool, this output will be
connected to the relay. PORT 3 of the micro used for a variety of needs in accordance with
the usefulness of the port 3.
Use of port 3 are as follows:
-P3.0 (RXD) is used as input from serial communication between devices with
microcontroller.
- P3.1 (TXD) is used as output to serial communication between a mobile and
microcontroller.
DEPTT. OF ELECTRONICS AND COMMUNICATION ENGG. Page 74
GSM BASED AUTOMATIC DISPLAY TOOLKIT
Fig 3.3 Circuit Diagram Mobile Phone and Microcontroller Communication
3.5 SERIAL COMMUNICATIONS UNIT
Communication between the mobile phone by means done serially, with the voltage levels
to RS232. Voltage level because of differences between the micro with a serial port data
cable cell phones that have been compatible with the RS232 standard, we need a voltage
converter.
Max232 IC is used as a modifier on the micro-TTL voltage levels to RS232 voltage levels.
Asynchronous communication is done with the amount of data to 8 bits, noparity, and use
a baud rate of ± 57 600 bps, used for data transmission facilities that exist on micro
controller which is a facility at 3.0 ports (RXD), port 3.1 (TXD) and GND.
DEPTT. OF ELECTRONICS AND COMMUNICATION ENGG. Page 75
GSM BASED AUTOMATIC DISPLAY TOOLKIT
Fig 3.4 Mobile Phone and Microcontroller Communication (RS232 Serial
Communication Schematic Diagram)
3.6 POWER-DOWN MODE
In the Power-down mode, the oscillator is stopped, and the instruction that invokes Power-
down is the last instruction executed. The on-chip RAM and Special Function Registers
retain their values until the Power-down mode is terminated.
Exit from Power-down mode can be initiated either by a hardware reset or by an enabled
external interrupt. Reset redefines the SFRs but does not change the on-chip RAM. The
reset should not be activated before VCC is restored to its normal operating level and must
be held active long enough to allow the oscillator to restart and stabilize.
DEPTT. OF ELECTRONICS AND COMMUNICATION ENGG. Page 76
GSM BASED AUTOMATIC DISPLAY TOOLKIT
Fig 3.5 Crystal Connections
3.7 INTERFACING
3.7.1 GSM MODULE WITH MICROCONTROLLER
3.7.1.1 DTE and DCE
The terms DTE and DCE are very common in the data communications market. DTE is
short for Data Terminal Equipment and DCE stands for Data Communications Equipment.
But what do they really mean? As the full DTE name indicates this is a piece of device that
ends a communication line, whereas the DCE provides a path for communication.
Let’s say we have a computer on which wants to communicate with the Internet through a
modem and a dial-up connection. To get to the Internet you tell your modem to dial the
number of your provider. After your modems has dialed the number, the modem of the
provider will answer your call and your will hear a lot of noise.
Then it becomes quiet and you see your login prompt or your dialing program tells you the
connection is established. Now you have a connection with the server from your provider
and you can wander the Internet.
In this example you PC is a Data Terminal (DTE). The two modems (yours and that one of
your provider) are DCEs, they make the communication between you and your provider
DEPTT. OF ELECTRONICS AND COMMUNICATION ENGG. Page 77
GSM BASED AUTOMATIC DISPLAY TOOLKIT
possible. But now we have to look at the server of your provider. Is that a DTE or DCE?
The answer is a DTE.
It ends the communication line between you and the server. When you want to go from
your provided server to another place it uses another interface. So DTE and DCE are
interfacing dependent.
It is e.g. possible that for your connection to the server, the server is a DTE, but that that
same server is a DCE for the equipment that it is attached to on the rest of the Net.
3.7.1.2 RS-232
In telecommunications, RS-232 is a standard for serial binary data signals connecting
between a DTE (Data terminal equipment) and a DCE (Data Circuit-terminating
Equipment). It is commonly used in computer serial ports.
In RS-232, data is sent as a time-series of bits. Both synchronous and asynchronous
transmissions are supported by the standard. In addition to the data circuits, the standard
defines a number of control circuits used to manage the connection between the DTE and
DCE.
Each data or control circuit only operates in one direction that is, signaling from a DTE to
the attached DCE or the reverse. Since transmit data and receive data are separate circuits,
the interface can operate in a full duplex manner, supporting concurrent data flow in both
directions. The standard does not define character framing within the data stream, or
character encoding.
3.7.1.3 RS-232 SIGNALS
Transmitted Data (TxD)
Data sent from DTE to DCE.
DEPTT. OF ELECTRONICS AND COMMUNICATION ENGG. Page 78
GSM BASED AUTOMATIC DISPLAY TOOLKIT
Received Data (RxD)
Data sent from DCE to DTE.
Request To Send (RTS)
Asserted (set to 0) by DTE to prepare DCE to receive data. This may require action on the
part of the DCE, e.g. transmitting a carrier or reversing the direction of a half-duplex line.
Clear To Send (CTS)
Asserted by DCE to acknowledge RTS and allow DTE to transmit.
Data Terminal Ready (DTR)
Asserted by DTE to indicate that it is ready to be connected.If the DCE is a modem, it
should go “off hook” when it receives this signal. If this signal is deasserted ,the modem
should respond by immediately hanging up.
Data Set Ready (DSR)
Asserted by DCE to indicate an active connection.If DCE is not a modem (e.g. a null-
modem cable or other equipment), this signal should be permanently asserted (set to 0),
possibly by a jumper to another signal.
Carrier Detect (CD)
Asserted by DCE when a connection has been established with remote equipment.
Ring Indicator (RI)
Asserted by DCE when it detects a ring signal from the telephone line.
3.7.2 MICROCONTROLLER WITH LCD DISPLAY
As we’ve mentioned, the LCD requires either 8 or 11 I/O lines to communicate with. For
the sake of this tutorial, we are going to use an 8-bit data bus—so we’ll be using 11 of the
8051’s I/O pins to interface with the LCD. Let’s draw a sample pseudo-schematic of how
the LCD will be connected to the 8051.
DEPTT. OF ELECTRONICS AND COMMUNICATION ENGG. Page 79
GSM BASED AUTOMATIC DISPLAY TOOLKIT
Fig 3.6 Interfacing of Microcontroller with LCD
8051 microcontroller have 4 ports. For the interfacing of microcontroller to LCD
port 1 and port 3 are used.
The 8 pins of port 1 is connected to the 8 pin of LCD i.e. from DB0 to DB7 where
DB stands for DATA BUS.
DB0 to DB7 are used to send information to the LCD or read the contents of the
LCD’s internal registers.
The 3 pins of port 3 are connected with 3 different CONTROL PINS of the LCD.
Pin 7 of port 3 is connected with EN pin of the LCD to latch information presented
to its data pins. This control line is used to tell the LCD that you are sending data.
Pin 6 of port 3 is connected with RS i.e. REGISTER SELECT pin of the LCD. RS
pin is used for the selection of the two important registers inside the LCD-
-If RS=0 the Instruction command register is selected which allows the user to send
a command such as clear display etc.
-If RS=1 the Data register is selected which allows the user to send data to be
displayed on the LCD.
Pin 5 of port 3 is connected with the RW i.e. READ WRITE pin of the LCD.
-When RW =1 it allow the user to write information to the LCD.
-When RW= 0 it allows the user to read information from the LCD.
There are 16 pins connection on the LCD display module.
Pin NO. Symbol Level Description 1 VSS 0V Ground 2 VDD 5.0V Supply voltage for logic 3 VO --- Input voltage for LCD 4 RS H/L H : Data, L : Instruction code 5 R/W H/L H : Read mode, L : Write mode 6 E H, H → L Chip enable signal
DEPTT. OF ELECTRONICS AND COMMUNICATION ENGG. Page 80
GSM BASED AUTOMATIC DISPLAY TOOLKIT
7 DB0 H/L Data bit 0 8 DB1 H/L Data bit 1 9 DB2 H/L Data bit 2 10 DB3 H/L Data bit 3 11 DB4 H/L Data bit 4 12 DB5 H/L Data bit 5 13 DB6 H/L Data bit 6 14 DB7 H/L Data bit 7 15 BLA 4.2V Back light anode 16 BLK 0V Back light cathode
Table 3.1 Pins connection on the LCD display module
3.7.3 ANTENNA INTERFACE
The RF interface has an impedance of 50Ω. To suit the physical design of individual
applications SIM300 offers two alternatives:
Recommended approach: antenna connector on the component side of the PCB
Antenna pad and grounding plane placed on the bottom side.
To minimize the loss on the RF cable, it need be very careful to choose RF cable.
We recommend the insertion loss should be meet following requirement:
- GSM900<1dB
-DCS1800/PCS1900<1.5dB
3.7.4 SIM CARD INTERFACE
You can use AT Command to get information in SIM card. The SIM interface supports the
functionality of the GSM Phase 1 specification and also supports the functionality of the
new GSM Phase 2+ specification for FAST 64 kbps SIM (intended for use with a SIM
application Tool-kit). Both 1.8V and 3.0V SIM Cards are supported.
The SIM interface is powered from an internal regulator in the module having nominal
voltage 2.8V. All pins reset as outputs driving low. Logic levels are as described in table
DEPTT. OF ELECTRONICS AND COMMUNICATION ENGG. Page 81
GSM BASED AUTOMATIC DISPLAY TOOLKIT
Table 3.2 Signal of SIM interface (board-to-board connector)
3.7.5 SERIAL INTERFACES
SIM300 provides two unbalanced asynchronous serial ports. The GSM module is designed
as a DCE (Data Communication Equipment), following the traditional DCE-DTE (Data
Terminal Equipment) connection, the module and the client (DTE) are connected through
the following signal (as following figure shows). Autobauding supports baud rate from
1200 bps to 115200bps.
Serial port 1
Port/TXD @ Client sends data to the RXD signal line of module.
Port/RXD @ Client receives data from the TXD signal line of module.
Serial port 2
Port/TXD @ Client sends data to the DBGRX signal line of module.
Port/RXD @ Client receives data from the DBGTX signal line of module.
DEPTT. OF ELECTRONICS AND COMMUNICATION ENGG. Page 82
GSM BASED AUTOMATIC DISPLAY TOOLKIT
All pins of two serial ports have 8mA driver, the logic levels are described in following
table
Table 3.3 Logic levels of serial ports pins
DEPTT. OF ELECTRONICS AND COMMUNICATION ENGG. Page 83
GSM BASED AUTOMATIC DISPLAY TOOLKIT
SOFTWARE
DEPTT. OF ELECTRONICS AND COMMUNICATION ENGG. Page 84
GSM BASED AUTOMATIC DISPLAY TOOLKIT
4.1 PROGRAMMING FOR ANALOG TO DIGITAL CONVERSION
#include<regx51.h>
#define rd P2_7
#define wr P3_6
#define intr P3_7
#define cs P2_6
char adcdata;
unsigned char readadc(void);
unsigned char readadc()
{
cs=0;
wr=0;
wr=1;
cs=1;
while(intr);
cs=0;
rd=0;
adcdata=P1;
rd=1;
cs=1;
return adcdata;
}
4.2 PROGRAMMING FOR BTS
#include<lcd.h>
////////////////////////////////////////////////
void sendmat1();
void read_msg();
void sendc(unsigned char ch);
DEPTT. OF ELECTRONICS AND COMMUNICATION ENGG. Page 85
GSM BASED AUTOMATIC DISPLAY TOOLKIT
void sends(unsigned char *str);
void enter();
void serial_init();
void modem_init(); // initialize modem
unsigned char recvb();
void read_sms() ;
////////////////////////////////////////////////
unsigned char data i=0,j=0,k=0;
unsigned char data com[15],com1[63];
unsigned char data cmd[6];
int flag,f ;
////////////////////////////////////////////////
void main()
{
flag=0;
serial_init();
LCD_init();
LCD_row1();
LCD_puts(" Automatic ") ;
LCD_row2();
LCD_puts(" GSM Toolkit ") ;
delay(1000);
LCD_row1();
LCD_puts("Project Done By:") ;
LCD_row2();
LCD_puts("Monika Tulasyan ") ;
delay(1000);
modem_init();
sends("AT+CMGL=");
sendc('"');
sends("ALL");
sendc('"');
DEPTT. OF ELECTRONICS AND COMMUNICATION ENGG. Page 86
GSM BASED AUTOMATIC DISPLAY TOOLKIT
enter();
read_sms();
if(cmd[3]=='+')
{
sends("AT+CMGL=");
sendc('"');
sends("ALL");
sendc('"');
enter(); // read sms
read_msg();
LCD_row1();
for(i=1;i<17;i++)
{
LCD_putc(com1[i]);
}
LCD_row2();
for(i=17;i<33;i++)
{
LCD_putc(com1[i]);
} // display
}
else
{
sends("no matchat"); // do nothing
}
//IE=0x90; // ENABLE SERIAL INTERRUPT ES
i=0;j=0;
while(1)
{
serial_init();
read_sms();
if(cmd[2]=='+')
{
DEPTT. OF ELECTRONICS AND COMMUNICATION ENGG. Page 87
GSM BASED AUTOMATIC DISPLAY TOOLKIT
if(cmd[14]=='1')
{
sends("message one");
enter();
sends("AT+CMGD=2");
enter();
sends("AT+CMGR=");
sendc(cmd[14]);
enter(); // autoamtically reads sms. read new message
//display
read_msg();
LCD_row1();
for(i=1;i<17;i++)
{
LCD_putc(com1[i]);
}
LCD_row2();
for(i=17;i<33;i++)
{
LCD_putc(com1[i]);
}
}
else if(cmd[14]=='2')
{
sends("message two");
enter();
sends("AT+CMGD=1");
enter();
sends("AT+CMGR=");
sendc(cmd[14]);
enter(); // autoamtically reads sms. read new message
//display
read_msg();
DEPTT. OF ELECTRONICS AND COMMUNICATION ENGG. Page 88
GSM BASED AUTOMATIC DISPLAY TOOLKIT
LCD_row1();
for(i=1;i<17;i++)
{
LCD_putc(com1[i]);
}
LCD_row2();
for(i=17;i<33;i++)
{
LCD_putc(com1[i]);
}
}
else
{
sends("AT+CMGD=");
sendc(cmd[14]);
enter();
}
}
else
{
sends("invalid");
}
i=0;j=0;
modem_init();
serial_init();
delay(2000);
}
}
void sendc(unsigned char ch)
{
TI = 0;
SBUF = ch;
while(!TI);
DEPTT. OF ELECTRONICS AND COMMUNICATION ENGG. Page 89
GSM BASED AUTOMATIC DISPLAY TOOLKIT
delay(1);
}
void sends(unsigned char *str)
{
while(*str != '\0')
sendc(*str++);
}
void enter()
{
sendc(0x0d);
}
void modem_init()
{
sendc('A');
sendc('T');
enter();
delay(20);
sends("AT+CMGF=1");
enter();
}
unsigned char recvb()
{
unsigned char c;
RI=0;
while(!RI);
RI = 0;
c = SBUF;
return(c);
}
void sendmat()
{
for(j=0;j<15;j++)
{
DEPTT. OF ELECTRONICS AND COMMUNICATION ENGG. Page 90
GSM BASED AUTOMATIC DISPLAY TOOLKIT
SBUF=cmd[j];
while(TI==0); //wait for transmit
TI=0;
}
j=0;
}
void read_sms()
{
com[0]=recvb();
com[1]=recvb();
com[2]=recvb();
com[3]=recvb();
com[4]=recvb();
com[5]=recvb();
com[6]=recvb();
com[7]=recvb();
com[8]=recvb();
com[9]=recvb();
com[10]=recvb();
com[11]=recvb();
com[12]=recvb();
com[13]=recvb();
com[14]=recvb();
for(i=0;i<15;i++,j++)
{
cmd[j]=com[i];
}
delay(500);
sendc('$');
sendmat();
delay(100);
DEPTT. OF ELECTRONICS AND COMMUNICATION ENGG. Page 91
GSM BASED AUTOMATIC DISPLAY TOOLKIT
}
void read_msg() //
{
com1[0]=recvb();
com1[1]=recvb();
com1[2]=recvb();
com1[3]=recvb();
com1[4]=recvb();
com1[5]=recvb();
com1[6]=recvb();
com1[7]=recvb();
com1[8]=recvb();
com1[9]=recvb();
com1[10]=recvb();
com1[11]=recvb();
com1[12]=recvb();
com1[13]=recvb();
com1[14]=recvb();
com1[15]=recvb();
com1[16]=recvb();
com1[17]=recvb();
com1[18]=recvb();
com1[19]=recvb();
com1[20]=recvb();
com1[21]=recvb();
com1[22]=recvb();
com1[23]=recvb();
com1[24]=recvb();
com1[25]=recvb();
com1[26]=recvb();
com1[27]=recvb();
DEPTT. OF ELECTRONICS AND COMMUNICATION ENGG. Page 92
GSM BASED AUTOMATIC DISPLAY TOOLKIT
com1[28]=recvb();
com1[29]=recvb();
com1[30]=recvb();
com1[31]=recvb();
com1[32]=recvb();
com1[33]=recvb();
com1[34]=recvb();
com1[35]=recvb();
com1[36]=recvb();
com1[37]=recvb();
com1[38]=recvb();
com1[39]=recvb();
com1[40]=recvb();
com1[41]=recvb();
com1[42]=recvb();
com1[43]=recvb();
com1[44]=recvb();
com1[45]=recvb();
com1[46]=recvb();
com1[47]=recvb();
com1[48]=recvb();
com1[49]=recvb();
com1[50]=recvb();
com1[51]=recvb();
com1[52]=recvb();
com1[53]=recvb();
com1[54]=recvb();
com1[55]=recvb();
com1[56]=recvb();
com1[57]=recvb();
com1[58]=recvb();
com1[59]=recvb();
com1[60]=recvb();
DEPTT. OF ELECTRONICS AND COMMUNICATION ENGG. Page 93
GSM BASED AUTOMATIC DISPLAY TOOLKIT
com1[61]=recvb();
com1[0]=recvb();
com1[1]=recvb();
com1[2]=recvb();
com1[3]=recvb();
com1[4]=recvb();
com1[5]=recvb();
com1[6]=recvb();
com1[7]=recvb();
com1[8]=recvb();
com1[9]=recvb();
com1[10]=recvb();
com1[11]=recvb();
com1[12]=recvb();
com1[13]=recvb();
com1[14]=recvb();
com1[15]=recvb();
com1[16]=recvb();
com1[17]=recvb();
com1[18]=recvb();
com1[19]=recvb();
com1[20]=recvb();
com1[21]=recvb();
com1[22]=recvb();
com1[23]=recvb();
com1[24]=recvb();
com1[25]=recvb();
com1[26]=recvb();
com1[27]=recvb();
com1[28]=recvb();
com1[29]=recvb();
com1[30]=recvb();
com1[31]=recvb();
DEPTT. OF ELECTRONICS AND COMMUNICATION ENGG. Page 94
GSM BASED AUTOMATIC DISPLAY TOOLKIT
com1[32]=recvb();
delay(400);
sendmat1();
delay(100);
}
void sendmat1()
{
for(j=0;j<33;j++)
{
SBUF=com1[j];
while(TI==0); //wait for transmit
TI=0;
}
}
void serial_init()
{
SCON = 0x50; //mode 1 serial
communication
TMOD = 0x20; //timer 1 auto reload
mode
TH1 = 0xfd; //9600 baudrate at 11.0592
MHz
TR1 = 1;
}
DEPTT. OF ELECTRONICS AND COMMUNICATION ENGG. Page 95
GSM BASED AUTOMATIC DISPLAY TOOLKIT
4.3 PROGRAMMING FOR DELAY
extern void delay(unsigned int y);
4.4 PROGRAMMING FOR LCD
#include<regxx51.h>
#include<delay.h>
#define LCD_en P2_4
#define LCD_rs P2_5
#define LCD_row1() LCD_command(0x80) /* Begin at Line 1 */
#define LCD_row2() LCD_command(0xC0) /* Begin at Line 2 */
/***************************************************
* Prototype(s) *
***************************************************/
void LCD_enable();
void LCD_command(unsigned char command);
void LCD_putc(unsigned char ascii);
void LCD_puts(unsigned char *lcd_string);
void LCD_init();
void convrt(unsigned char var);
int a,b,c;
/***************************************************
* Sources *
***************************************************/
void LCD_enable()
{
LCD_en = 0; /* Clear bit P2.4 */
DEPTT. OF ELECTRONICS AND COMMUNICATION ENGG. Page 96
GSM BASED AUTOMATIC DISPLAY TOOLKIT
delay(1);
LCD_en = 1; /* Set bit P2.4 */
}
void LCD_command(unsigned char command)
{
LCD_rs = 0; /* Clear bit P2.5 */
P2 = (P2 & 0xF0)|((command>>4) & 0x0F);
LCD_enable();
P2 = (P2 & 0xF0)|(command & 0x0F);
LCD_enable();
delay(1);
}
void LCD_putc(unsigned char ascii)
{
LCD_rs = 1; /* Set bit P2.5 */
P2 = (P2 & 0xF0)|((ascii>>4) & 0x0F);
LCD_enable();
P2 = (P2 & 0xF0)|(ascii & 0x0F);
LCD_enable();
delay(1);
}
void LCD_puts(unsigned char *lcd_string)
{
while (*lcd_string)
{
LCD_putc(*lcd_string++);
}
}
void LCD_init()
DEPTT. OF ELECTRONICS AND COMMUNICATION ENGG. Page 97
GSM BASED AUTOMATIC DISPLAY TOOLKIT
{
LCD_en = 1; /* Set bit P2.4 */
LCD_rs = 0; /* Clear bit P2.5 */
LCD_command(0x33);
LCD_command(0x32);
LCD_command(0x28);
LCD_command(0x0C);
LCD_command(0x06);
LCD_command(0x01); /* Clear */
delay(2);
}
4.5 PROGRAMMING OF REGISTER XX51
/*--------------------------------------------------------------------------
AT89XX51.H
-------------------------------------------------------------------------*/
////
#ifndef __AT89XX51_H__
#define __AT89XX51_H__
/*------------------------------------------------
Byte Registers
------------------------------------------------*/
sfr P0 = 0x80;
sfr SP = 0x81;
sfr DPL = 0x82;
sfr DPH = 0x83;
sfr PCON = 0x87;
sfr TCON = 0x88;
sfr TMOD = 0x89;
sfr TL0 = 0x8A;
sfr TL1 = 0x8B;
DEPTT. OF ELECTRONICS AND COMMUNICATION ENGG. Page 98
GSM BASED AUTOMATIC DISPLAY TOOLKIT
sfr TH0 = 0x8C;
sfr TH1 = 0x8D;
sfr P1 = 0x90;
sfr SCON = 0x98;
sfr SBUF = 0x99;
sfr P2 = 0xA0;
sfr IE = 0xA8;
sfr P3 = 0xB0;
sfr IP = 0xB8;
sfr PSW = 0xD0;
sfr ACC = 0xE0;
sfr B = 0xF0;
/*------------------------------------------------
P0 Bit Registers
------------------------------------------------*/
sbit P0_0 = 0x80;
sbit P0_1 = 0x81;
sbit P0_2 = 0x82;
sbit P0_3 = 0x83;
sbit P0_4 = 0x84;
sbit P0_5 = 0x85;
sbit P0_6 = 0x86;
sbit P0_7 = 0x87;
/*------------------------------------------------
PCON Bit Values
------------------------------------------------*/
#define STOP_ 0x02
#define PD_ 0x02 /* Alternate definition */
#define GF0_ 0x04
#define GF1_ 0x08
#define SMOD_ 0x80
/*------------------------------------------------
DEPTT. OF ELECTRONICS AND COMMUNICATION ENGG. Page 99
GSM BASED AUTOMATIC DISPLAY TOOLKIT
TCON Bit Registers
------------------------------------------------*/
sbit IT0 = 0x88;
sbit IE0 = 0x89;
sbit IT1 = 0x8A;
sbit IE1 = 0x8B;
sbit TR0 = 0x8C;
sbit TF0 = 0x8D;
sbit TR1 = 0x8E;
sbit TF1 = 0x8F;
/*------------------------------------------------
P1 Bit Registers
------------------------------------------------*/
sbit P1_0 = 0x90;
sbit P1_1 = 0x91;
sbit P1_2 = 0x92;
sbit P1_3 = 0x93;
sbit P1_4 = 0x94;
sbit P1_5 = 0x95;
sbit P1_6 = 0x96;
sbit P1_7 = 0x97;
/*------------------------------------------------
SCON Bit Registers
------------------------------------------------*/
sbit RI = 0x98;
sbit TI = 0x99;
sbit RB8 = 0x9A;
sbit TB8 = 0x9B;
sbit REN = 0x9C;
sbit SM2 = 0x9D;
sbit SM1 = 0x9E;
sbit SM0 = 0x9F;
DEPTT. OF ELECTRONICS AND COMMUNICATION ENGG. Page 100
GSM BASED AUTOMATIC DISPLAY TOOLKIT
/*------------------------------------------------
P2 Bit Registers
------------------------------------------------*/
sbit P2_0 = 0xA0;
sbit P2_1 = 0xA1;
sbit P2_2 = 0xA2;
sbit P2_3 = 0xA3;
sbit P2_4 = 0xA4;
sbit P2_5 = 0xA5;
sbit P2_6 = 0xA6;
sbit P2_7 = 0xA7;
/*------------------------------------------------
IE Bit Registers
------------------------------------------------*/
sbit EX0 = 0xA8; /* 1=Enable External interrupt 0 */
sbit ET0 = 0xA9; /* 1=Enable Timer 0 interrupt */
sbit EX1 = 0xAA; /* 1=Enable External interrupt 1 */
sbit ET1 = 0xAB; /* 1=Enable Timer 1 interrupt */
sbit ES = 0xAC; /* 1=Enable Serial port interrupt */
sbit ET2 = 0xAD; /* 1=Enable Timer 2 interrupt */
sbit EA = 0xAF; /* 0=Disable all interrupts */
/*------------------------------------------------
P3 Bit Registers (Mnemonics & Ports)
------------------------------------------------*/
sbit P3_0 = 0xB0;
sbit P3_1 = 0xB1;
sbit P3_2 = 0xB2;
sbit P3_3 = 0xB3;
sbit P3_4 = 0xB4;
sbit P3_5 = 0xB5;
sbit P3_6 = 0xB6;
sbit P3_7 = 0xB7;
DEPTT. OF ELECTRONICS AND COMMUNICATION ENGG. Page 101
GSM BASED AUTOMATIC DISPLAY TOOLKIT
/*------------------------------------------------
Interrupt Vectors:
Interrupt Address = (Number * 8) + 3
------------------------------------------------*/
#define IE0_VECTOR 0 /* 0x03 External Interrupt 0 */
#define TF0_VECTOR 1 /* 0x0B Timer 0 */
#define IE1_VECTOR 2 /* 0x13 External Interrupt 1 */
#define TF1_VECTOR 3 /* 0x1B Timer 1 */
#define SIO_VECTOR 4 /* 0x23 Serial port */
#endif
DEPTT. OF ELECTRONICS AND COMMUNICATION ENGG. Page 102
GSM BASED AUTOMATIC DISPLAY TOOLKIT
APPENDICES
DEPTT. OF ELECTRONICS AND COMMUNICATION ENGG. Page 103
GSM BASED AUTOMATIC DISPLAY TOOLKIT
APPENDIX 1
DATA SHEET OF LCD
The Extended Concise LCD Data Sheet for HD44780 Version: 25.6.1999
Instruction RS RW D7 D6 D5 D4 D3 D2 D1 D0 DescriptionClock-Cycles
NOP 0 0 0 0 0 0 0 0 0 0 No Operation
Clear Display 0 0 0 0 0 0 0 0 0 1 Clear display & set address counter to zero
Cursor Home 0 0 0 0 0 0 0 0 1 xSet adress counter to zero, return shifted display to original position.DD RAM contents remains unchanged.
Entry Mode Set 0 0 0 0 0 0 0 1 I/D S Set cursor move direction (I/D) and specify automatic display shift (S).
Display Control
0 0 0 0 0 0 1 D C B Turn display (D), cursor on/off (C), and cursor blinking (B).
Cursor / Display shift
0 0 0 0 0 1 S/C R/L x x Shift display or move cursor (S/C) and specify direction (R/L).
Function Set 0 0 0 0 1 DL N F x x Set interface data width (DL), number of display lines (N) and character font (F).
Set CGRAM Address
0 0 0 1 CGRAM Address Set CGRAM address. CGRAM data is sent afterwards.
Set DDRAM Address
0 0 1 DDRAM Address Set DDRAM address. DDRAM data is sent afterwards.
Busy Flag & Address
0 1 BF Address Counter Read busy flag (BF) and address counter
Write Data 1 0 Data Write data into DDRAM or CGRAM
Read Data 1 1 Data Read data from DDRAM or CGRAM
x : Don't care I/D10
IncrementDecrement
R/L10
Shift to the rightShift to the left
S10
Automatic display shiftDL
10
8 bit interface4 bit interface
D10
Display ONDisplay OFF
N10
2 lines1 line
C10
Cursor ONCursor OFF
F10
5x10 dots5x7 dots
B10
Cursor blinkingDDRAM : Display Data RAM
CGRAM : Character Generator RAMS/C10
Display shiftCursor move
LCD Display with 2 lines x 16 characters :
DEPTT. OF ELECTRONICS AND COMMUNICATION ENGG. Page 104
GSM BASED AUTOMATIC DISPLAY TOOLKIT
Pin No Name Function Description1 Vss Power GND2 Vdd Power + 5 V3 Vee Contrast Adj. (-2) 0 - 5 V4 RS Command Register Select5 R/W Command Read / Write6 E Command Enable (Strobe)7 D0 I/O Data LSB8 D1 I/O Data9 D2 I/O Data
10 D3 I/O Data11 D4 I/O Data12 D5 I/O Data13 D6 I/O Data14 D7 I/O Data MSB
Bus Timing Characteristics
( Ta = - 20 to + 75°C )
Write-Cycle VDD 2.7 - 4.5 V (2) 4.5 - 5.5 V (2) 2.7 - 4.5 V (2) 4.5 - 5.5 V (2)
Parameter Symbol Min(1) Typ(1) Max(1) Unit
Enable Cycle Time tc 1000 500 - - - ns
Enable Pulse Width (High) tw 450 230 - - - ns
Enable Rise/Fall Time tr, tf - - - 25 20 ns
Address Setup Time tas 60 40 - - - ns
Address Hold Time tah 20 10 - - - ns
Data Setup Time tds 195 80 - - - ns
Data Hold Time th 10 10 - - - ns
DEPTT. OF ELECTRONICS AND COMMUNICATION ENGG. Page 105
GSM BASED AUTOMATIC DISPLAY TOOLKIT
(1) The above specifications are indications only (based on Hitachi HD44780).
Timing will vary from manufacturer to manufacturer.
(2) Power Supply : HD44780 S : VDD = 4.5 - 5.5 V
HD44780 U : VDD = 2.7 - 5.5 V
This data sheet refers to specifications for the Hitachi HD44780 LCD Driver chip, which is
used for most LCD modules.
Common types are : 1 line x 20 characters
2 lines x 16 characters
2 lines x 20 characters
2 lines x 40 characters
4 lines x 20 characters
4 lines x 40 characters
APPENDIX 2
DATASHEET OF MICROCONTROLLER
DEPTT. OF ELECTRONICS AND COMMUNICATION ENGG. Page 106
GSM BASED AUTOMATIC DISPLAY TOOLKIT
DEPTT. OF ELECTRONICS AND COMMUNICATION ENGG. Page 107
GSM BASED AUTOMATIC DISPLAY TOOLKIT
DEPTT. OF ELECTRONICS AND COMMUNICATION ENGG. Page 108
GSM BASED AUTOMATIC DISPLAY TOOLKIT
DEPTT. OF ELECTRONICS AND COMMUNICATION ENGG. Page 109
GSM BASED AUTOMATIC DISPLAY TOOLKIT
DEPTT. OF ELECTRONICS AND COMMUNICATION ENGG. Page 110
GSM BASED AUTOMATIC DISPLAY TOOLKIT
DEPTT. OF ELECTRONICS AND COMMUNICATION ENGG. Page 111
GSM BASED AUTOMATIC DISPLAY TOOLKIT
APPENDIX 3
DATASHEET OF LINEAR INTEGRATED CIRCUIT
DEPTT. OF ELECTRONICS AND COMMUNICATION ENGG. Page 112
GSM BASED AUTOMATIC DISPLAY TOOLKIT
APPENDIX 4
NPN GENERAL PURPOSE AMPLIFIER
DEPTT. OF ELECTRONICS AND COMMUNICATION ENGG. Page 113
GSM BASED AUTOMATIC DISPLAY TOOLKIT
DEPTT. OF ELECTRONICS AND COMMUNICATION ENGG. Page 114
GSM BASED AUTOMATIC DISPLAY TOOLKIT
APPENDIX 5
AT COMMANDS
THE AT STANDARD
With the development of intelligent modems, an command language was introduced in the
U.S. called the AT standard. Over the past few years, this language has been consistently
enhanced and has gained international acceptance. Most modems and communication
programs work with this command language or can be set to use it.
AT COMMAND LINE PREFIX
The AT standard is a line-oriented command language. Each command line must begin
with the letters AT, with the sole exception of the A/ command. The commands are
introduced at the end of this section.
The letters AT are also known as the attention code. The attention code signals your GSM
module that one or more commands will follow. The GSM module examines this
command line prefix.
CONNECTING TO YOUR GSM MODULE
You have connected your GSM module to your PC. You can now connect to your GSM
module. To do so, start up a communication program on your PC. Set the following
transmission parameters (characteristics):
COM interface: 1 - 4, depending on which one the M1 is connected to
Rate: 2400 - 19200 baud
Data bits: 8
Parity: None
Stop bits: 1
Duplex: Full
DEPTT. OF ELECTRONICS AND COMMUNICATION ENGG. Page 115
GSM BASED AUTOMATIC DISPLAY TOOLKIT
The GSM module supports auto bauding on the V.24 interface with transfer rates from
2400 to 19200 baud and the data format 8N1.
COMMAND SYNTAX OF THE AT STANDARD
• Command lines must always begin with AT.
• Multiple commands can be combined on one command line. To improve legibility ,you
can enter spaces between the individual commands. The GSM module ignores these
spaces.
• Commands that are specified in this manual with "0" in the last position can also be
entered without this "0". Example: ATQ has the same effect as ATQ0.
• A command line must end with a <CR> character, which is entered by pressing "Enter"
on the keyboard. This fact will not be mentioned again in this manual.
DEPTT. OF ELECTRONICS AND COMMUNICATION ENGG. Page 116
GSM BASED AUTOMATIC DISPLAY TOOLKIT
GENERAL AT COMMANDS
DEPTT. OF ELECTRONICS AND COMMUNICATION ENGG. Page 117
GSM BASED AUTOMATIC DISPLAY TOOLKIT
REFERENCE
WEBSITES
http://www.datasheetcatalog.com
http://matrixtelesol.com
http://www.8051.com
www.wikipedia.org
www.keil.com/forum/docs
http://www.alldatasheet.co.kr/datasheetpdf/
www.embeddedrelated.com
www.howstuffworks.com
DEPTT. OF ELECTRONICS AND COMMUNICATION ENGG. Page 118
GSM BASED AUTOMATIC DISPLAY TOOLKIT
DEPTT. OF ELECTRONICS AND COMMUNICATION ENGG. Page 119
GSM BASED AUTOMATIC DISPLAY TOOLKIT
DEPTT. OF ELECTRONICS AND COMMUNICATION ENGG. Page 120
top related