1. PROJECT REPORT 1
Government Polytechnic College, Neyyattinkara Electronic & Communication
PROJECT REPORT
ON
WIRELESS ELECTRONIC NOTICE BOARD
BY
ANOOP M P ANUJITH B S
NIDHIN S SAJAN C K
SREEJITH S UNNI KRISHNAN G A
VISHNU S S
DIPLOMA IN ELECTRONICS & COMMUNICATION
DEPARTMENT OF ELECTRONICS AND COMMUNICATION
GOVT. POLYTECHNIC COLLEGE
NEYYATTINKARA
2017
2. PROJECT REPORT 2
Government Polytechnic College, Neyyattinkara Electronic & Communication
PROJECT REPORT
ON
WIRELESS ELECTRONIC NOTICE BOARD
BY
ANOOP M P ANUJITH B S
NIDHIN S SAJAN C K
SREEJITH S UNNI KRISHNAN G A
VISHNU S S
DIPLOMA IN ELECTRONICS & COMMUNICATION
DEPARTMENT OF ELECTRONICS AND COMMUNICATION
GOVT. POLYTECHNIC COLLEGE
NEYYATTINKARA
2017
3. PROJECT REPORT 3
Government Polytechnic College, Neyyattinkara Electronic & Communication
DEPARTMENT OF' ELECTRONICS AND COMMUNICATION
GOVERNMENT POLYTECHNIC COLLEGE
NEYYATTINKARA
2017
Certificate
This is to certify that this seminar report is a bonafide record of the work done by
ANOOP M P, ANUJITH B S, NIDHIN S, SAJAN C K, SREEJITH S, UNNI
KRISHNAN G A, VISHNU S S, under my guidance towards the partial fulfillment
of the requirement for the award of Diploma in Electronics and Communication
Engineering of the Department of Technical Education, Kerala during the year
2017.
Guided By SRI.SULFICAR A
Smt. Reeya George HEAD OF DEPARTMENT
Lecturer ELECTRONICS &COMMUNICATION
4. PROJECT REPORT 4
Government Polytechnic College, Neyyattinkara Electronic & Communication
ACKOWLEDGEMENT
We take this opportunity to express our sincere gratitude and profound obligation to
Sri. SULFICAR A, Head of Department of Electronics and Communication engineering, Govt
Polytechnic College Neyyattinkara.
We also wish to express our gratitude to Sri.PAVITHRAKUMAR G, Smt. DIVYA C
Sri.ARAVIND SEKHAR R, Smt.REEYA GEORGE, for his help and encouragement done
through this work.
Last but not the least; We are extremely grateful to all our friends without whose timely
aid could not have completed the work successfully.
5. PROJECT REPORT 5
Government Polytechnic College, Neyyattinkara Electronic & Communication
CONTENT
INTRODUCTION………….……………………………………...……………………….......3
MODULE – 1
GENERAL BLOCK DIAGRAM…………………………………………...……………..….6
1.1 BLOCK DIAGRAM OF WIRELESS NOTICE BOARD…………………….….....6
1.2 LIQUID CRYSTAL DISPLAY…………………………………..…………….……7
1.3 USART……. ……………………………………………...........................................10
1.4 MUX………………………….....................................................................................11
1.5 MAX232 CONVERTER…………………………………………………..……….14
1.6 ZIGBEE…………………………………………………………………………..…17
1.7 GSM MODULE……………………………………………………………..............22
1.8 RESET LOGIC…………………………………………………………………….26
1.9 CRYSTAL OSCILLATOR………………………………………………………..26
1.10 BUZZER…………………………………………………………………………30
1.11 POWER SUPPLY……………………………………………………………...…31
MODULE – II
COMPLETE CIRCUITE DIAGRAM…………………………………...………..............33
2.1 SYSTEM REQUIREMENTS…..……………………...............................................33
2.2 CIRCUIT OF LCD INTERFACING WITH ATMEGA32…………………….....36
2.3 INTERFACING GSM WITH MICROCONTROLLER…………….…………..38
2.4 INTERFACING MAX232 WITH MICRCONTROLLER……………….…..…40
2.5 OVERALL CIRCUIT DIAGRAM………………………………………………42
6. PROJECT REPORT 6
Government Polytechnic College, Neyyattinkara Electronic & Communication
MODULE - III
COMPONENT DISCREPTION..………..............................................................................43
3.1 GSM……………………………………………………….……………………...43
3.2 ATMEGA32…………………………………………………………...................47
3.3 POWER SUPPLY………………………………………………………….……..58
3.4 CRYSTAL OSCILLATOR…………….....................................................................63
MODULE – IV
WORKING & PROGRAMMING…………………………………....................................65
4.1 WORKING…………………………….……………………………………………65
4.2 PROGRAMME……………………………………………………….…………...69
CONCLUSIONS………………………………………….……………….………….83
REFERENCE……………………………………………….............…………………84
7. PROJECT REPORT 7
Government Polytechnic College, Neyyattinkara Electronic & Communication
INTRODUCTION
Wireless communication has announced its arrival on big stage and the
world is going mobile. We want to control everything and without moving an
inch. This remote controlof appliances is possible through Embedded Systems.
The use of “Embedded System inCommunication” has given rise to many
interesting applications that ensures comfort and safety to human life.
The main aim of this project will be to design a SMS driven automatic
display board which can replace the currently used programmable electronic
display. It is proposed to design receiver cum display board which can be
programmed from an authorized mobile phone. The message to be displayed is
sent through a SMS from an authorized transmitter. The microcontroller receives
the SMS, validates the sender and displays the desired information. Started off as
an instantaneous NEWS display unit, we have improved upon it and tried to take
advantage of the computing capabilities of microcontroller. Looking into current
trend of information transfer in the campus, it is seen that important notice take
time to be displayed in the notice boards. This latency is not expected in most of
the cases and must be avoided. It is proposed to implement this project at the
institute level. It is proposed to place display boards in major access points.
The electronic 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. The GSM
based display board can be used as an add-on to these display boards and make it
truly wireless. The 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 system required for the purpose is nothing but a
8. PROJECT REPORT 8
Government Polytechnic College, Neyyattinkara Electronic & Communication
Microcontroller based SMS box. The main components of the kit include
microcontroller, GSM modem. These components are integrated with the display
board and thus incorporate the wireless features. The GSM modem receives the
SMS. The AT commands are serially transferred to the modem through serial
transmit and receive connection. In return the modem transmits the stored message
through the same serial port. The microcontroller validates the SMS and then
displays the message on the LCD display board. Various time division
multiplexing techniques have been suggested to make the display boards
functionally efficient. The microcontroller used in this case is ATMEGA32.
SIMCOM 900A is used as the GSM modem. The data will be displayed only after
entering unique pass key. In addition to that address matching is done and data can
be receive only by the dedicated receiver, and this data is displayed on LCD
display. The main focus of the thesis is on displaying information to a dedicated
LCD display by the any part of world using GSM network, which facilitate to
control any message board globally from any location.
Message is Send from mobile to GSM Modem from any location where
GSM messaging service is available. Message is received at GSM modem and
processed using microcontroller. Now message is stored in controller and
displayed on LED display. Every unit is connected to power supply which is a
prerequisite for operation.
9. PROJECT REPORT 9
Government Polytechnic College, Neyyattinkara Electronic & Communication
OVER ALL VIEW OF WIRELESS ELECTRONIC NOTICE BOARD
10. PROJECT REPORT 10
Government Polytechnic College, Neyyattinkara Electronic & Communication
MODULE - I
GENERAL BLOCK DIAGRAM
1.1 BLOCK DIAGRAM OF WIRELESS NOTICE BOARD
GND
A
T
M
E
G
E
3
2
LCD DISPLAY
RESET
CRYSTAL
OSCILLATOR
USART
MUX
CONVERTER
MAX232
LCD MODULE
ZIGBEE
GSM MODULE
POWER SUPPLY
BUZZER
11. PROJECT REPORT 11
Government Polytechnic College, Neyyattinkara Electronic & Communication
1.1.1 DESCRIPTION
The system required for this purpose is nothing but, a Microcontroller based
SMS box. The main components of the kit includes Microcontroller, GSM modem.
These components are integrated with the display board and thus incorporate the
wireless features. The GSM modem receives the SMS. The AT commands are
serially transferred to the modem through MAX232. In return the modem transmits
the stored message through the COM port. The microcontroller validates the SMS
and then displays the message in the LCD display board. Various time division
multiplexing techniques have been suggested to make the display boards function
efficiently. The microcontroller used in this case is ATMEGA32Apu524, Motorola
C168 is used as the GSM modem. In this prototype model, LCD display is used for
simulation purpose. During the process of implementation this can be replaced by
actual display boards. In addition to address matching, data can be received only
by the dedicated receiver, and this data is displayed on LCD. It displays the same
message until it receives another verified message.
1.2 LIQUID CRYSTAL DISPLAY
LCD (Liquid Crystal Display) screen is an electronic display module and find a
wide range of applications. A 16x2 LCD display is very basic module and is very
commonly used in various devices and circuits. These modules are preferred
overseen segments and other multi segment LEDs. The reasons being: LCDs are
economical; easily programmable; have no limitation of displaying special & even
custom characters (unlike in seven segments), animations and so on.
12. PROJECT REPORT 12
Government Polytechnic College, Neyyattinkara Electronic & Communication
A 16x2 LCD means it can display 16 characters per line and there are 2 such lines.
In this LCD each character is displayed in 5x7 pixel matrix. This LCD has two
registers, namely, Command and Data.
The command register stores the command instructions given to the LCD. A
command is an instruction given to LCD to do a predefined task like initializing it,
clearing its screen, setting the cursor position, controlling display etc. The data
register stores the data to be displayed on the LCD. The data is the ASCII value of
the character to be displayed on the LCD. Click to learn more about internal
structure of a LCD .
1.2.1 PIN DIAGRAM
13. PROJECT REPORT 13
Government Polytechnic College, Neyyattinkara Electronic & Communication
Pin
No
Function Name
1 Ground (0V) Ground
2 Supply voltage; 5V (4.7V – 5.3V) Vcc
3 Contrast adjustment; through a variable resistor VEE
4 Selects command register when low; and data register
when high
Register
Select
5 Low to write to the register; High to read from the
register
Read/write
6 Sends data to data pins when a high to low pulse is
given
Enable
7
8-bit data pins
DB0
8 DB1
9 DB2
10 DB3
11 DB4
12 DB5
13 DB6
14 DB7
15 Backlight VCC (5V) Led+
16 Backlight Ground (0V) Led-
14. PROJECT REPORT 14
Government Polytechnic College, Neyyattinkara Electronic & Communication
1.3 USART
A Universal Synchronous/Asynchronous Receiver/Transmitter (USART ) is
a type of a serial interface device that can be programmed to communicate
asynchronously or synchronously. See Universal asynchronous receiver/transmitter
(UART) for a discussion of the asynchronous capabilities of these devices.
PURPOSE AND HISTORY
The USART's synchronous capabilities were primarily intended to support
synchronous protocols like IBM'sSynchronous transmit-receive (STR),Binary
Synchronous Communications (BSC), Synchronous Data Link Control (SDLC),
and the ISO-standard High-Level Data Link Control (HDLC) synchronous link-
layer protocols, which were used with synchronous voice-frequency modems .
These protocols were designed to make the best use of bandwidth when modems
were analog devices. In those times, the fastest asynchronous voice-band modem
could achieve at most speeds of 300 bit/s using frequency-shift keying modulation
, while synchronous modems could run at speeds up to 9600 bit/s using phase-shift
keying . Synchronous transmission used only slightly over 80% of the bandwidth
of the now more-familiar asynchronous transmission, since start and stop bits were
unnecessary. Those modems are obsolete, having been replaced by modems which
convert asynchronous data to synchronous forms, but similar synchronous
telecommunications protocols survive in numerous block-oriented technologies
such as the widely used IEEE 802.2 (Ethernet) link-level protocol. USARTs are
still sometimes integrated with MCUs. USARTs are still used in routers that
connect to external CSU/DSU devices, and they often use either Cisco's
15. PROJECT REPORT 15
Government Polytechnic College, Neyyattinkara Electronic & Communication
proprietary HDLC implementation or theIETF standard Point-to-Point Protocol in
HDLC-like framing as defined in RFC 1662 .
OPERATION
The operation of a USART is intimately related to the various protocols; refer to
those pages for details. This section only provides a few general notes.
USARTs in synchronous mode transmit data in frames. In synchronous operation,
characters must be provided on time until a frame is complete; if the controlling
processordoes not do so, this is an"underrun error ," and transmission of the frame
is aborted.
USARTs operating as synchronous devices used either character-oriented or bit-
oriented mode. In character (STR and BSC) modes, the device relied on particular
characters to define frame boundaries; in bit (HDLC and SDLC) modes earlier
devices relied on physical-layer signals, while later devices took over the physical-
layer recognition of bit patterns.
A synchronous line is never silent; when the modem is transmitting, data is
flowing. When the physical layer indicates that the modem is active, a USART will
send a steady stream of padding, either characters or bits as appropriate to the
device and protocol.
1.4 MUX
In electronics, a multiplexer (or mux) is a device that selects one of several
Analog or digital input signals and forwards the selected input into a single line.A
multiplexer of 2 n inputs has n select lines, which are used to select which input
line to send to the output. Multiplexers are mainly used to increase the amount of
data that can be sent over the network within a certain amount of time and
16. PROJECT REPORT 16
Government Polytechnic College, Neyyattinkara Electronic & Communication
bandwidth. A multiplexer is also called a data selector. Multiplexers can also be
used to implement Boolean functions of multiple variables.
An electronic multiplexer makes it possible for several signals to share one device
or resource, for example one A/D converter or one communication line, instead of
having one device per input signal.
Conversely, a demultiplexer (or demux ) is a device taking a single input signal
and selecting one of many data-output-lines, which is connected to the single input.
A multiplexer is often used with a complementary demultiplexer on the receiving
end.
An electronic multiplexer can be considered as a multiple-input, single-
output switch, and a demultiplexer as asingle-input, multiple-output switch. The
schematic symbol for a multiplexer is an isosceles trapezoid with the longer
parallel side containing the input pins and the short parallel side containing the
output pin.[4] The schematic on the right shows a 2-to-1 multiplexer on the left and
an equivalent switch on the right. The wire connects the desired input to the output.
Cost saving
The basic function of a multiplexer: combining multiple inputs into a single
data stream. On the receiving side, a demultiplexer splits the single data stream
into the original multiple signals.
One use for multiplexers is economizing connections over a single channel,
by connecting the multiplexer's single output to the demultiplexer's single input.
The image to the right demonstrates this benefit. In this case, the cost of
implementing separate channels for each data source is higher than the cost and
inconvenience of providing the multiplexing/demultiplexing functions.
17. PROJECT REPORT 17
Government Polytechnic College, Neyyattinkara Electronic & Communication
At the receiving end of the data link a complementary demultiplexer is usually
required to break the single data stream back down into the original streams. In
some cases, the far end system may have functionality greater than a simple
demultiplexer; and while the demultiplexing still occurs technically, it may never
be implemented discretely. This would be typical when: a multiplexer serves a
number of IP network users; and then feeds directly into a router, which
immediately reads the content of the entire link into its routing processor; and then
does the demultiplexing in memory from where it will be converted directly into IP
sections.
MULTIPLEXER
Often, a multiplexer and demultiplexer are combined together into a single
piece of equipment, which is conveniently referred to as a "multiplexer". Both
circuit elements are needed at both ends of a transmission link because most
communications systems transmit in both directions.
In analog circuit design, a multiplexer is a special type of analog switch that
connects one signal selected from several inputs to a single output.
Digital multiplexers
In digital circuit design, the selector wires are of digital value. In the case of
a 2-to-1 multiplexer, a logic value of 0 would connect to the output while a logic
18. PROJECT REPORT 18
Government Polytechnic College, Neyyattinkara Electronic & Communication
value of 1 would connect to the output. In larger multiplexers, the number of
selector pins is equal towhere is the number of inputs.
For example, 9 to 16 inputs would require no fewer than 4 selector pins and
17 to 32 inputs would require no fewer than 5 selector pins. The binary value
expressed on these selector pins determines the selected input pin.
A 2-to-1 multiplexer has a boolean equation where and are the two inputs, is the
selector input, and is the output:
DEMULTIPLEXER
1.5 MAX232 CONVERTER
The MAX232 is an integrated circuit first created in 1987 by Maxim
Integrated Products that converts signals from a TIA-232 (RS-232) serial port to
signals suitable for use in TTL-compatible digital logic circuits. The MAX232 is a
dual transmitter / dual receiver that typically is used to convert the RX, TX, CTS,
RTS signals.
The drivers provide TIA-232 voltage level outputs (about ±7.5 volts) from a
single 5-volt supply by on-chip charge pumps and external capacitors. This makes
19. PROJECT REPORT 19
Government Polytechnic College, Neyyattinkara Electronic & Communication
it useful for implementing TIA-232 in devices that otherwise do not need any other
voltages.
The receivers reduce TIA-232 inputs, which may be as high as ±25 volts, to
standard 5 volt TTL levels. These receivers have a typical threshold of 1.3 volts
and a typical hysteresis of 0.5 volts.
The MAX232 replaced an older pair of chips MC1488 and MC1489 that
performed similar RS-232 translation. The MC1488 quad transmitter chip required
12 volt and -12 volt power, [1] and MC1489 quad receiver chip required 5 volt
power. The main disadvantages of this older solution was the +/- 12 volt power
requirement, only supported 5 volt digital logic, and two chips instead of one.
20. PROJECT REPORT 20
Government Polytechnic College, Neyyattinkara Electronic & Communication
The later MAX232A is backward compatible with the original MAX232 but
may operate at higher baud rates and can use smaller external capacitors – 0.1 μF
in place of the 1.0 μF capacitors used with the original device. [3] The newer
MAX3232 and MAX3232E are also backwards compatible, but operates at a
broader voltage range, from 3 to 5.5 V.
Pin-to-pin compatible versions from other manufacturers are ICL232,
SP232, ST232, ADM232 and HIN232.
Texas Instruments makes compatible chips, using MAX232 as the part
number.
1.5.1 VOLTAGE LEVELS
It is helpful to understand what occurs to the voltage levels. When a MAX232 IC
receives a TTL level to convert, it changes a TTL logic 0 to between +3 and +15
V, and changes TTL logic 1 to between −3 and −15 V, and vice versa for
converting from TIA-232 to TTL. This can be confusing when you realize that the
TIA-232 data transmission voltages at a certain logic state are opposite from the
TIA-232 control line voltages at the same logic state. To clarify the matter, see the
table below. For more information, see RS-232 voltage levels
21. PROJECT REPORT 21
Government Polytechnic College, Neyyattinkara Electronic & Communication
1.6 ZIGBEE
ZIGBEE is an IEEE 802.15.4 -based specification for a suite of high-level
communication protocols used to create personal area networks with small, low-
power digital radios, such as for home automation, medical device data collection,
and other low-power low-bandwidth needs, designed for small scale projects which
need wireless connection.
` The technology defined by the ZIGBEE specification is intended to be
simpler and less expensive than other wireless personal area networks (WPANs),
such as Bluetooth or Wi-Fi . Applications include wireless light switches, electrical
22. PROJECT REPORT 22
Government Polytechnic College, Neyyattinkara Electronic & Communication
meters with in-home-displays, traffic management systems, and other consumer
and industrial equipment that requires short-range low-rate wireless data transfer.
Its low power consumption limits transmission distances to 10–100 meters line-of-
sight , depending on power output and environmental characteristics. [2] ZigBee
devices can transmit data over long distances by passing data through a mesh
network of intermediate devices to reach more distant ones. ZIGBEE is typically
used in low data rate applications that require long battery life and secure
networking (ZigBee networks are secured by 128 bit symmetric encryption keys.)
ZigBee has a defined rate of 250 kbit/s, best suited for intermittent data
transmissions from a sensor or input device.
ZigBee was conceived in 1998, standardized in 2003, and revised in 2006.
The name refers to the waggle dance of honey bees after their return to the
beehive. ZigBee is a low-cost, low-power, wireless mesh network standard
targeted at the wide development of long battery life devices in wireless control
and monitoring applications. Zigbee devices have low latency, which further
reduces average current. ZigBee chips are typically integrated with radios and with
microcontrollers that have between 60-256 KB of flash memory. ZigBee operates
in the industrial, scientific and medical (ISM ) radio bands: 2.4 GHz in most
jurisdictions worldwide; 784 MHz in China, 868 MHz in Europe and 915 MHz in
the USA and Australia. Data rates vary from 20 kbit/s (868 MHz band) to 250
kbit/s (2.4 GHz band).
The ZigBee network layer natively supports both star and tree networks, and
generic mesh networking. Every network must have one coordinator device, tasked
with its creation, the control of its parameters and basic maintenance. Within star
networks, the coordinator must be the central node. Both trees and meshes allow
the use of ZigBee routers to extend communication at the network level.
23. PROJECT REPORT 23
Government Polytechnic College, Neyyattinkara Electronic & Communication
ZigBee builds on the physical layer and media access control defined in
IEEE standard 802.15.4 for low-rate WPANs . The specification includes four
additional key components: network layer, application layer, ZigBee device objects
(ZDOs) and manufacturer-defined application objects which allow for
customization and favor total integration. ZDOs are responsible for some tasks,
including keeping track of device roles, managing requests to join a network, as
well as device discovery and security.
ZigBee is one of the global standards of communication protocol formulated
by the significant task force under the IEEE 802.15 working group. The fourth in
the series, WPAN Low Rate/ZigBee is the newest and provides specifications for
devices that have low data rates, consume very low power and are thus
characterized by long battery life. Other standards like Bluetooth and IrDA address
high data rate applications such as voice, video and LAN communications.
ZIGBEE DEVICES ARE OF THREE KINDS:
ZigBee Coordinator (ZC) : The most capable device, the Coordinator forms
the root of the network tree and might bridge to other networks. There is
precisely one ZigBee Coordinator in each network since it is the device that
started the network originally (the ZigBee LightLink specification also
allows operation without a ZigBee Coordinator, making it more usable for
over-the-shelf home products). It stores information about the network,
including acting as the Trust Center & repository for security keys.
ZigBee Router (ZR) : As well as running an application function, a Router
can act as an intermediate router, passing on data from other devices.
24. PROJECT REPORT 24
Government Polytechnic College, Neyyattinkara Electronic & Communication
ZigBee End Device (ZED) : Contains just enough functionality to talk to the
parent node (either the Coordinator or a Router); it cannot relay data from
other devices. This relationship allows the node to be asleep a significant
amount of the time thereby giving long battery life. A ZED requires the least
amount of memory, and, therefore, can be less expensive to manufacture
than a ZR or ZC.
The current ZigBee protocols support beacon and non-beacon enabled
networks. In non-beacon-enabled networks, an unslotted CSMA/CA channel
access mechanism is used. In this type of network, ZigBee Routers typically have
their receivers continuously active, requiring a more robust power supply.
However, this allows for heterogeneous networks in which some devices receive
continuously while others only transmit when an external stimulus is detected. The
typical example of a heterogeneous network is a wireless light switch: The ZigBee
node at the lamp may constantly receive, since it is connected to the mains supply,
while a battery-powered light switch would remain asleep until the switch is
thrown. The switch then wakes up, sends a command to the lamp, receives an
acknowledgment, and returns to sleep. In such a network the lamp node will be at
least a ZigBee Router, if not the ZigBee Coordinator; the switch node is typically a
ZigBee End Device.
In beacon-enabled networks, the special network nodes called ZigBee
Routers transmit periodic beacons to confirm their presence to other network
nodes. Nodes may sleep between beacons, thus lowering their duty cycle and
extending their battery life. Beacon intervals depend on data rate; they may range
from 15.36 milliseconds to 251.65824 seconds at 250 kbit/s , from 24 milliseconds
to 393.216 seconds at 40 kbit/s and from 48 milliseconds to 786.432 seconds at 20
25. PROJECT REPORT 25
Government Polytechnic College, Neyyattinkara Electronic & Communication
kbit/s. However, low duty cycle operation with long beacon intervals requires
precise timing, which can conflict with the need for low product cost.
In general, the ZigBee protocols minimize the time the radio is on, so as to
reduce power use. In beaconing networks, nodes only need to be active while a
beacon is being transmitted. In non-beacon-enabled networks, power consumption
is decidedly asymmetrical: Some devices are always active while others spend
most of their time sleeping.
Except for the Smart Energy Profile 2.0, ZigBee devices are required to
conform to the IEEE 802.15.4 -2003 Low-Rate Wireless Personal Area Network
(LR-WPAN) standard. The standard specifies the lower protocol layers —the
physical layer (PHY), and the Media Access Control portion of the data link layer
(DLL). The basic channel access mode is "carrier sense, multiple access/collision
avoidance" ( CSMA/CA). That is, the nodes talk in the same way that humans
converse; they briefly check to see that no one is talking before he or she start, with
three notable exceptions. Beacons are sent on a fixed timing schedule and do not
use CSMA. Message acknowledgments also do not use CSMA. Finally, devices in
beacon-enabled networks that have low latency real-time requirements may also
use Guaranteed Time Slots (GTS), which by definition do not use CSMA.
26. PROJECT REPORT 26
Government Polytechnic College, Neyyattinkara Electronic & Communication
1.7 GSM MODULE
GSM/GPRS ModuleGSM/GPRS module is used to establish communication
between a computer and a GSM-GPRS system.
Global System for Mobile communication (GSM) is an architecture used for
mobile communication in most of the countries. Global Packet Radio Service
(GPRS) is an extension of GSM that enables higher data transmission rate.
GSM/GPRS module consists of a GSM/GPRS modem assembled together with
power supply circuit and communication interfaces (like RS-232, USB, etc) for
computer. The MODEM is the soul of such modules.
27. PROJECT REPORT 27
Government Polytechnic College, Neyyattinkara Electronic & Communication
1.7.1 WIRELESS MODEMS
Wireless MODEMs are the MODEM devices that generate, transmit or
decode data from a cellular network, for establishing communication between the
cellular network and the computer. These are manufactured for specific cellular
network (GSM/UMTS/CDMA ) or specific cellular data standard
(GSM/UMTS/GPRS/ EDGE /HSDPA) or technology (GPS /SIM). Wireless
MODEMs like other MODEM devices use serial communication to interface with
and need Hayes compatible AT commands for communication with the computer
(any microprocessor or microcontroller system).
28. PROJECT REPORT 28
Government Polytechnic College, Neyyattinkara Electronic & Communication
1.7.2 GSM/GPRS MODEM
GSM/GPRS MODEM is a class of wireless MODEM devices that are
designed for communication of a computer with the GSM and GPRS network. It
requires a SIM (Subscriber Identity Module) card just like mobile phones to
activate communication with the network. Also they have IMEI (International
Mobile Equipment Identity) number similar to mobile phones for their
identification. A GSM/GPRS MODEM can perform the following operations:
Receive, send or delete SMS messages in a SIM.
Read, add, search phonebook entries of the SIM.
Make, Receive, or reject a voice call.
29. PROJECT REPORT 29
Government Polytechnic College, Neyyattinkara Electronic & Communication
The MODEM needs AT commands, for interacting with processor or
controller, which are communicated through serial communication. These
commands are sent by the controller/processor. The MODEM sends back a result
after it receives a command. Different AT commands supported by the MODEM
can be sent by the processor/controller/computer to interact with the GSM and
GPRS cellular network.
1.7.3 GSM/GPRS MODULE
A GSM/GPRS module assembles a GSM/GPRS modem with standard
communication interfaces like RS-232 (Serial Port), USB etc., so that it can be
easily interfaced with a computer or a microprocessor / microcontroller based
system. The power supply circuit is also built in the module that can be activated
by using a suitable adaptor.
30. PROJECT REPORT 30
Government Polytechnic College, Neyyattinkara Electronic & Communication
1.8 RESET LOGIC
From the Logic Menu, Returns the logic objects to their original state.
Counters and Shifters are returned to their initial values, but logic sources are not
changed.
1.9 CRYSTAL OSCILLATOR
A crystal oscillator is an electronic oscillator circuit that uses the mechanical
resonance of a vibrating crystal of piezoelectric material to create an electrical
signal with a precise frequency. This frequency is commonly used to keep track of
time, as in quartz wristwatches, to provide a stable clock signal for digital
integrated circuits, and to stabilize frequencies for radio transmitters and receivers .
The most common type of piezoelectric resonator used is the quartz crystal, so
oscillator circuits incorporating them became known as crystal oscillators, [1] but
other piezoelectric materials including polycrystalline ceramics are used in similar
circuits.
Quartz crystals are manufactured for frequencies from a few tens of
kilohertz to hundreds of megahertz. More than two billion crystals are
manufactured annually. Most are used for consumer devices such as wristwatches,
31. PROJECT REPORT 31
Government Polytechnic College, Neyyattinkara Electronic & Communication
clocks, radios, computers, and cellphones. Quartz crystals are also found inside test
and measurement equipment, such as counters, signal generators, and
oscilloscopes.
1.9.1 TERMINOLOGY
A crystal oscillator is an electronic oscillator circuit that uses a piezoelectric
resonator, a crystal, as its frequency-determining element. Crystal is the common
term used in electronics for the frequency-determining component, a wafer of
quartz crystal or ceramic with electrodes connected to it. A more accurate term for
it is piezoelectric resonator . Crystals are also used in other types of electronic
circuits, such as crystal filters .
Piezoelectric resonators are sold as separate components for use in crystal
oscillator circuits. An example is shown in the picture. They are also often
incorporated in a single package with the crystal oscillator circuit, shown on the
right-hand side.
1.9.2 OPERATION
A crystal is a solid in which the constituent atoms , molecules , or ions are
packed in a regularly ordered, repeating pattern extending in all three spatial
dimensions.
Almost any object made of an elastic material could be used like a crystal,
with appropriate transducers, since all objects have natural resonant frequencies of
vibration . For example, steel is very elastic and has a high speed of sound. It was
32. PROJECT REPORT 32
Government Polytechnic College, Neyyattinkara Electronic & Communication
often used in mechanical filters before quartz. The resonant frequency depends on
size, shape, elasticity, and the speed of sound in the material. High-frequency
crystals are typically cut in the shape of a simple, rectangular plate. Low-frequency
crystals, such as those used in digital watches, are typically cut in the shape of a
tuning fork . For applications not needing very precise timing, a low-cost ceramic
resonator is often used in place of a quartz crystal.
When a crystal of quartz is properly cut and mounted, it can be made to
distort in an electric field by applying a voltage to an electrode near or on the
crystal. This property is known as electrostriction or inverse piezoelectricity. When
the field is removed, the quartz generates an electric field as it returns to its
previous shape, and this can generate a voltage. The result is that a quartz crystal
behaves like an RLC circuit, composed of an inductor, capacitor and resistor , with
a precise resonant frequency.
Quartz has the further advantage that its elastic constants and its size change
in such a way that the frequency dependence on temperature can be very low. The
specific characteristics depend on the mode of vibration and the angle at which the
quartz is cut (relative to its crystallographic axes). Therefore, the resonant
frequency of the plate, which depends on its size, does not change much. This
means that a quartz clock, filter or oscillator remains accurate. For critical
applications the quartz oscillator is mounted in a temperature-controlled container,
called a crystal oven , and can also be mounted on shock absorbers to prevent
perturbation by external mechanical vibrations.
Modeling
33. PROJECT REPORT 33
Government Polytechnic College, Neyyattinkara Electronic & Communication
1.9.3 ELECTRICAL MODEL
A quartz crystal can be modeled as an electrical network with a low-impedance
(series) and a high-impedance (parallel) resonance points spaced closely together.
Mathematically (using the Laplace transform ), the impedance of this network can
be written as:
Schematic symbol and equivalent circuit for a quartz crystal in an oscillator
34. PROJECT REPORT 34
Government Polytechnic College, Neyyattinkara Electronic & Communication
Where s is the complex frequency (), is the series resonant angular frequency , and
is the parallel resonant angular frequency
.
Adding capacitance across a crystal causes the (parallel) resonant frequency
to decrease. Adding inductance across a crystal causes the (parallel) resonant
frequency to increase. These effects can be used to adjust the frequency at which a
crystal oscillates. Crystal manufacturers normally cut and trim their crystals to
have a specified resonant frequency with a known "load" capacitance added to the
crystal. For example, a crystal intended for a 6 pF load has its specified parallel
resonant frequency when a 6.0 pF capacitor is placed across it. Without the load
capacitance, the resonant frequency is higher.
1.10 BUZZER
A buzzer is a mechanical, electromechanical, magnetic, electromagnetic,
electro-acoustic or piezoelectric audio signalling device. A piezo electric buzzer
can be driven by an oscillating electronic circuit or other audio signal source. A
click, beep or ring can indicate that a button has been pressed.
35. PROJECT REPORT 35
Government Polytechnic College, Neyyattinkara Electronic & Communication
1.11 POWER SUPPLY
A power supply is an electronic device that supplies electric energy to an
electrical load . The primary function of a power supply is to convert one form of
electrical energy to another and, as a result, power supplies are sometimes referred
to as electric power converters .
Some power supplies are discrete, stand-alone devices, whereas others are
built into larger devices along with their loads. Examples of the latter include
power supplies found in desktop computers and consumer electronics devices
.
Every power supply must obtain the energy it supplies to its load, as well as
any energy it consumes while performing that task, from an energy source.
Depending on its design, a power supply may obtain energy from various types of
energy sources, including electrical energy transmission systems, energy storage
devices such as a batteries and fuel cells , electromechanical systems such as
generators and alternators , solar power converters, or another power supply.
All power supplies have a power input , which receives energy from the
energy source, and a power output that delivers energy to the load. In most power
supplies the power input and output consist of electrical connectors or hardwired
circuit connections, though some power supplies employ wireless energy transfer
in lieu of galvanic connections for the power input or output.
36. PROJECT REPORT 36
Government Polytechnic College, Neyyattinkara Electronic & Communication
Some power supplies have other types of inputs and outputs as well, for
functions such as external monitoring and control.
37. PROJECT REPORT 37
Government Polytechnic College, Neyyattinkara Electronic & Communication
MOFULE- II
COMPLETE CIRCUITE DIAGRAM
2.1 SYSTEM REQUIREMENTS
The main aim of this project is to design a SMS driven automatic display
board which can replace the currently used programmable electronic display. It is
proposed to design receiver cum display board which can be programmed from an
authorized mobile phone. The message to be displayed is sent through a SMS from
an authorized transmitter. The microcontroller receives the SMS, validates the
sending Mobile Identification Number (MIN) and displays the desired information.
2.1.1 REQUIRED SYSTEMFUNCTIONALITY
The system required for the purpose is a Microcontroller based SMS box.
The main components of the kit include microcontroller, GSM modem. These
components are integrated with the display board and thus incorporate the wireless
features. The GSM modem receives the SMS. The AT commands are serially
transferred to the modem through RX-TX connection. In return the modem
transmits the stored message through the COM port. The microcontroller validates
the SMS and then displays the message in the LCD display board. Various time
division multiplexing techniques have been suggested to make the display boards
functionally efficient. The microcontroller used in this case is AT89S52. Simcom
sim300 is used as the GSM modem.
38. PROJECT REPORT 38
Government Polytechnic College, Neyyattinkara Electronic & Communication
In the prototype model, 16x2 character LCD display is used for simulation
purpose. While implementation this can be replaced by actually display boards.
The data will be displayed only after entering unique pass key. In addition to that
address matching is done and data can be received only by the dedicated receiver,
and this data is displayed on LCD. The main focus of the project is on displaying
information to a dedicated LCD by the any part of world using GSM network,
which facilitate to control any message board globally from any location.
2.1.2 HARDWARE REQUIREMENTS
Hardware
Components
Specification
GSM MODEM Simcom sim300
SIM Any SIM
Microcontroller ATMEGA32A
Power supply or
Power Adapter
5v – 12v dc power supply
Transformer with
Rectifier
230v AC to 12v DC
39. PROJECT REPORT 39
Government Polytechnic College, Neyyattinkara Electronic & Communication
LCD 16x2 character display
MAX 232 –
Miscellaneous –
2.1.3 SOFTWARE REQUIREMENTS
Software Tools Description
Embedded C The functionality of the System is
programmed using Embedded C
(Microcontroller)
Keil Software The programmed c file (file.c) is
converted to hex file using Keil
software
MS Hyper Terminal To connect GSM
40. PROJECT REPORT 40
Government Polytechnic College, Neyyattinkara Electronic & Communication
2.2 CIRCUIT FOR LCD INTERFACING WITH ATMEGA32
41. PROJECT REPORT 41
Government Polytechnic College, Neyyattinkara Electronic & Communication
Circuit diagram for LCD interfacing with 8051 microcontroller is shown in
the above figure. If you have basic understanding of 8051 then you must know
about EA(PIN 31), XTAL1 & XTAL2, RST pin(PIN 9), Vcc and Ground Pin of
8051 microcontroller. I have used these Pins in above circuit. If you don’t have any
idea about that then I recommend you to read this Article LED Interfacing with
8051 Microcontroller before going through LCD interfacing.
So besides these above pins we have connected the data pins (D0-D7) of
LCD to the Port 2 (P2_0 – P2_7) microcontroller. And control pins RS, RW and E
to the pin 12,13,14 (pin 2,3,4 of port 3) of microcontroller respectively.
PIN 2(VDD) and PIN 15(Backlight supply) of LCD are connected to voltage
(5v), and PIN 1 (VSS) and PIN 16(Backlight ground) are connected to ground.
Pin 3(V0) is connected to voltage (Vcc) through a variable resistor of 10k to
adjust the contrast of LCD. Middle leg of the variable resistor is connected to PIN
3 and other two legs are connected to voltage supply and Ground
42. PROJECT REPORT 42
Government Polytechnic College, Neyyattinkara Electronic & Communication
2.3 CIRCUIT DIAGRAM FOR INTERFACING GSM WITH
MICROCONTROLLER
43. PROJECT REPORT 43
Government Polytechnic College, Neyyattinkara Electronic & Communication
2.3.1 STEPS TO INTERFACE GSM MODEM WITH
MICROCONTROLLER:
STEP 1: MODEM TESTING:
The Modem consists of two indicating LED’s Green and Red to indicate the
availability of the network. Green indicates the availability of the network whereas
red indicates its absence. Turn the modem ON and wait for some time to register
itself in GSM network.
STEP 2: INTERFACING WITH AVR MICROCONTROLLER:
The Communication between AVR and modem takes place through USART
protocol. GSM Modem SIM900 works on TTL level hence we can interface
directly to RXD and TXD pins of AVR microcontroller. There is no need of using
Voltage or level converter between them. However if you ever happen to buy a
SIM300 or other module which operates above TTL level, you may want to use
MAX232 level converter IC to make the communication possible.
STEP 3: INITIALIZING MODEM:
The modem must be Initialized using the commands and then the process
you are about to carry out must be selected. In this tutorial am going to initialize
the modem and them make it to send a message “Hi Murugan” to my mobile using
the GSM modem. And then i will reply to the message which will be displayed in
the LCD interfaced to the microcontroller.
44. PROJECT REPORT 44
Government Polytechnic College, Neyyattinkara Electronic & Communication
2.4 CIRCUITE DIAGRAM FOR INTERFACING MAX232 WITH
MICROCONTROLLER
A connection between a computer and a self build Adriano (or other
microcontroller) is easy to make with a MAX232 chip. The figure below is an
almost classic design. It is according to the October 2002 revision of the datasheet:
C4 is connected between pin2 and earth, while in other designs it is connected
between pin 2 and Vcc (cathode on Vcc). This circuit just worked for me. I
guessed that if pin 2 has a higher potential than Vcc, it also has a higher potential
than ground. In some circuits you will also find it connected between pin 2 and 6In
principle you could do with only 2 signals (Tx and Rd), but I have added a reset
that is connected to the RTS signal on the sub connector (Via the Max232 of
course)Just for some clarification:
Normally with a serial communication set up, the Tx signal of one device, is
connected to the Rd pin of the other device. In this circuit, that is taken care of on
the Sub connector: Pin 3 is the Tx signal, that goes to the RdIn (pin 8) of the chip.
It is converted in voltage in the chip, then goes to RdOut on pin 9. That pin –
though called Rd- then goes to the Rd pin on the Adriano/At mega/Pic. The
connection between Tx and Rd already has been made, no need to switch that
again.
Same for the Tx signal of the microprocessor: It attaches to pin10 on the
Max232, is converted and appears on pin 7 of the chip and then is brought to the
Rd pin on the Sub connector. The DB9 plug in th epicure is a female plug looked
at from the solder side.
45. PROJECT REPORT 45
Government Polytechnic College, Neyyattinkara Electronic & Communication
If for any reason one would prefer to use an old SubD25 serial connector,
the table below shows the corresponding pins between the two. To make things a
bit confusing both pin 2 and 3 have exactly oppositefunctions on these connectors.
46. PROJECT REPORT 46
Government Polytechnic College, Neyyattinkara Electronic & Communication
2.5 OVERALL CIRCUIT DIAGRAM FOR WIRELESS
ELECTRONIC NOTICE BOARD
47. PROJECT REPORT 47
Government Polytechnic College, Neyyattinkara Electronic & Communication
MODULE - III
COMPONENTS DISCREPTION
3.1 GSM
GSM Stands for Global Network for Mobile Communication. A GSM
modem is a wireless modem that works with a GSM wireless network. GSM
Modem accepts a SIM card and operates over subscription to other users connected
to the Network. The GSM modem can be internally connected to a device or
external for use. GSM modem is a data communicating device. So the external
GSM Modems has serial communication interface to communicate with the data
terminal devices. Data terminal devices use special category of commands known
as AT commands abbreviation of Attention Commands to operate GSM Modem.
But AT commands were developed for the dial-up modems. So extended AT
commands were developed to control GSM modem, which support lot of services
related to SMS and SIM Memory access.
Following are some of the services supported byGSM Modem
Reading, writing and deleting SMS messages.
Sending SMS messages.
Monitoring the signal strength.
Reading, writing and searching phone book entries
48. PROJECT REPORT 48
Government Polytechnic College, Neyyattinkara Electronic & Communication
3.1.1 GSM MODEM SPECIFICATIONS
GSM modem is built with SIMCOM makes SIM900 Quad-Band
GSM Engine. It works on 850 MHz, 900 MHz, 1800 MHz and 1900 MHz.
The Modem is designed with RS232 level converter circuitry, which allows
you to directly interface PC serial port. The baud rate can be configurable
from 9600-115200 through AT command. Initially modem is in Auto baud
mode. It is suitable for SMS as well as data transfer application.
The modem needed only 3 wires (Tx, Rx, GND) except Power
supply to interface with microcontroller or PC. Using this modem, you will
be able to send & read SMS, connect to internet via GPRS through simple
AT commands.
SIM900GSM MODEM
49. PROJECT REPORT 49
Government Polytechnic College, Neyyattinkara Electronic & Communication
3.1.2 SPECIFICATIONOF GSM MODEM SIM900
Specification Description
Bands
Supported
Can support any of the bands out of 850/900/1800/1900
MHz
,hence known as Quad-Band
Control The device operation is controlled through extended AT
commands
SMS via GSM
a) Point-to-Point Mobile Originated and Mobile
Terminated
Messages
b) SMS Cell Broadcast
c) Text and PDU modes available
Operating
-40o C to 80o C
Temperature
Interfaces
a) RS232 Serial interface
b) SMA Antenna Connector
c) DC Power pins
Antenna
Antenna used for communication is GSM L Type
antenna
connected to Modem for operation through SMA
Antenna
connector. The antenna has features as specified below
:
a) Operating Frequencies : 850/900/1800/1900/2100
MHz
b) Gain : 3 dbi
c) Power : 10 Watts
d) Impedance : 50 ohms
e) Polarization : vertical
50. PROJECT REPORT 50
Government Polytechnic College, Neyyattinkara Electronic & Communication
3.1.3 TESTINGOF GSM MODEM
GSM Modem can be operated by connecting it to the desktop. GSM modem
is connected to the system using RS-232 module. This is usually the first step in
working with the GSM, because the operation between GSM Modem and system
gives idea how the AT commands need to be sent for proper communication and
what response is received corresponding to the command. The Software that
makes it more comprehensive is the HyperTerminal. It acts as an interface
between the serial communicating device and the terminal equipment. Whatever
user want to send through serial communication, it is just need to be written on
HyperTerminal and whatever received is shown on the Screen of HyperTerminal
interface. HyperTerminal is used to troubleshoot GSM modem.
Before you can use HyperTerminal to troubleshoot your modem, you must
create a connection to the port the modem is using. To do so, follow these steps
Click Start | Programs | Accessories | Communications | HyperTerminal.
Once HyperTerminal opens, it will automatically prompt you to create a new
connection if none exist. If no connection(s) exists, you can click File | New
Connection to create a new one.
Specify a name for the connection, choose an icon, and click OK. In the
Connect to dialog box, choose the COM port being used by your modem. In the
port property sheet that appears, choosea port speed (bits per second) that matches
the device. Then, choose communications parameters that match the device that is
the number of Data Bits, Start Bits, Stop Bits and Parity Bits.
51. PROJECT REPORT 51
Government Polytechnic College, Neyyattinkara Electronic & Communication
When you click OK, HyperTerminal will immediately open a connection to
the port. You'll then be ready to troubleshoot. Now, when you can type AT and
press [Enter] in the HyperTerminal connection to test communications. You should
receive an OK message if your settings are correct and the modem is working.
3.2 ATMEGA32
The ATmega32 is a low-power CMOS 8-bit microcontroller based on the
AVR enhanced RISC architecture. By executing powerful instructions in a single
clock cycle, the ATmega32 achieves throughputs approaching 1 MIPS per MHz
allowing the system designed to optimize power consumption versus processing
speed. The AVR core combines a rich instruction set with 32 general purpose
working registers. All the 32 registers are directly connected to the Arithmetic
Logic Unit (ALU), allowing two independent registers to be accessed in one single
instruction executed in one clock cycle. The resulting architecture is more code
efficient while achieving throughputs up to ten times faster than conventional
CISC microcontrollers.
The ATmega32 provides the following features: 32K bytes of In-System
Programmable Flash Program memory with Read-While-Write capabilities, 1024
bytes EEPROM, 2K byte SRAM, 32 general purpose I/O lines, 32 general purpose
working registers, a JTAG interface for Boundary-scan, On-chip Debugging
support and programming, three flexible Timer/Counters with compare modes,
Internal and External Interrupts, a serial programmable USART, a byte oriented
Two-wire Serial Interface, an 8-channel, 10-bit ADC with optional differential
input stage with programmable gain (TQFP package only), a programmable
Watchdog Timer with Internal Oscillator, an SPI serial port, and six software
52. PROJECT REPORT 52
Government Polytechnic College, Neyyattinkara Electronic & Communication
selectable power saving modes. The Idle mode stops the CPU while allowing the
USART, Two-wire interface, A/D Converter, SRAM, Timer/Counters, SPI port,
and interrupt system to continue functioning. The Power-down mode saves the
register contents but freezes the Oscillator, disabling all other chip functions until
the next External Interrupt or Hardware Reset. In Power-save mode, the
Asynchronous Timer continues to run, allowing the user to maintain a timer base
while the rest of the device is sleeping.
The ADC Noise Reduction mode stops the CPU and all I/O modules except
Asynchronous Timer and ADC, to minimize switching noise during ADC
conversions. In Stand by mode, the crystal/resonator Oscillator is running while the
rest of the device is sleeping.This allows very fast start-up combined with low-
power consumption. In Extended Standby mode,both the main Oscillator and the
Asynchronous Timer continue to run. The device is manufactured using Atmel’s
high density nonvolatile memory technology. The On-chip ISP Flash allows the
program memory to be reprogrammed in-system through an SPI serial interface, by
53. PROJECT REPORT 53
Government Polytechnic College, Neyyattinkara Electronic & Communication
a conventional nonvolatile memory programmer, or by an On-chip Boot program
running on the AVR core.
The boot program can use any interface to download the application
program in the Application Flash memory. Software in the Boot Flash section will
continue to run while the Application Flash section is updated, providing true
Read-While-Write operation. By combining an 8-bit RISC CPU with In-System
Self-Programmable Flash on a monolithic chip, the Atmel ATmega32 is a
powerful microcontroller that provides a highly-flexible and cost-effective solution
to many embedded control applications.
The ATmega32 AVR is supported with a full suite of program and system
development tools including: C compilers, macro assemblers, program
debugger/simulators, in-circuit emulators, and evaluation kits.
54. PROJECT REPORT 54
Government Polytechnic College, Neyyattinkara Electronic & Communication
3.2.1 BLOCKDIAGRAM OF ATMEGA32
55. PROJECT REPORT 55
Government Polytechnic College, Neyyattinkara Electronic & Communication
3.2.2 PIN DIAGRAM OF ATMEGA32
56. PROJECT REPORT 56
Government Polytechnic College, Neyyattinkara Electronic & Communication
VCC
This pin provides supply voltage to the chip. The typical voltage source is
+5V. Some AVR family members have lower voltages for VCC pins in order to
reduce the noise and power dissipation of the AVR systems.
AVCC
AVCC is the supply is the supply voltage for PortA and A/D Converter. It
should be externally connected to VCC, even if ADC is not used.
XTAL1 and XTAL2
The ATmega32 has many options for the clock source. Most often a quartz crystal
oscillator is connected to input pins of XTAL1 and XTAL2. The quartz crystal
oscillator connected to XTAL1 and XTAL2 pins also need two capacitors. One
side of each capacitor is connected to the ground as shown in the figure below.
ATmega32 can have speeds from 0Hz to 16MHz.
57. PROJECT REPORT 57
Government Polytechnic College, Neyyattinkara Electronic & Communication
RESET
Pin 9 (ATmega32, 40-PIN DIP) is the RESET pin. It is an input and is active
LOW (normally high). When a LOW pulse is applied to this pin, the
microcontroller will reset, and terminate all activities. After applying reset, the
contents of all registers and SRAM locations will be cleared. The CPU will start
executing the program from run locations 0x0000 after a brief delayed when reset
pin is forced low and released.
PORTS OF ATMEGA32
The 40 pin DIP has for ports. They are PORTA, PORTB, PORTC and
PORTD. To use any of these ports as input or output port, it must be programmed.
In addition to being used for simple I/O, each port has some other functions such
as ADC, timers, interrupts, and serial communication pins. Each port has three I/O
registers associated with it. They are designed as PORTx, DDRx and PINB. DDR
stands for Data Direction Register, and PIN stands for Port Input pins. Each of I/O
register is 8 bit wide, and each port has maximum of 8 pins.
Relations between the registers and the pins of AVR
DDRx 7 6 5 4 3 2 1 0
PORTx 7 6 5 4 3 2 1 0
PINx 7 6 5 4 3 2 1 0
58. PROJECT REPORT 58
Government Polytechnic College, Neyyattinkara Electronic & Communication
The DDRx I/O register is used solely for the purpose of making a given port
an input or output port. For example, to make a port an output port, we write 1s to
DDRx register. In other words, to output data to all of the pins of the PortB, we
must put 0b11111111 into the DDR register to make all of the pins output. To
make port an input port, we must first put 0s into the DDRx register for that port,
and bring (read) the data present at the pins. On reset, all ports have 0x00 in their
DDRx register.
To read the data present at the pins, we should read PIN register. It must be
noted that to bring data into CPU from pins we read the contents of the PINx
register, whereas to send data out of pins we use the PORTxregister
The I/O Port in AVR
All these pins can be programmed as either input or either output pins. There
are special functions associated with each pins which will be taken later in text.
59. PROJECT REPORT 59
Government Polytechnic College, Neyyattinkara Electronic & Communication
3.2.3 SERIALCOMMUNICATION
Computers transfer data in two ways: parallel and serial. In parallel data
transfers, often eight or more lines (wire conductors) are used to transfer data to a
device that is only a few feet away. Devices that use parallel transfers include
printers, each uses cable with many wires. Although a lot of data can be transferred
in a short amount of time by using a wires in parallel, the distance cannot be great.
To transfer to a device located many meters away, the serial method is used. In
serial communication, the data is sent one bit at a time, in contrast to parallel
communication, in which the data is sent a byte or more at a time.
Basics of Serial Communication
When the microcontroller communicates with the outside world, it provides
the data in byte sized chunks. For some devices, such as printers, the information is
simply grabbed from the 8-bit data bus presented to 8-bit data bus of the device.
This can work only if the cable is not too long, because long cables diminish and
even distort signals. Furthermore, an 8-bit path is expensive. For these reasons, the
serial communication is used for transferring data between two systems located at
distances of hundreds of feet to millions of miles apart. For serial communication
to work the byte of data must be converted to serial bits using a parallel-in-serial-
out shift register; then it can be transmitted over a single data line. This means that
receiver end should serial-in-parallel-out shift register to receive the serial data and
pack them into byte.
60. PROJECT REPORT 60
Government Polytechnic College, Neyyattinkara Electronic & Communication
Serial versus Parallel Data Transfer
Serial data communication uses synchronous method transfers a two
methods, asynchronous and synchronous. The block of data at a time whereas the
asynchronous method transfers a single byte at a time. It is possible to write
software to use either of these methods, but the programs can be tedious and long.
These chips are commonly referred to as UART and USART.
In data transmission, if the data can be both transmitted and received, it is a
duplex transmission. This is in contrast to simplex transmission such as with
printers, in which the computer sends data. Duplex transmissions can be half or full
duplex, depending on whether or not data transmission can be simultaneous. If data
is transmitted one way at a time, it is referred to as a half duplex. If the data can go
both the ways at a time, it is full duplex. Of course, full duplex requires two wire
conductors for data lines (in addition to signal ground), one for transmission and
one for reception, in order to transfer and receive data simultaneously.
61. PROJECT REPORT 61
Government Polytechnic College, Neyyattinkara Electronic & Communication
3.2.4 ASYNCHRONOUS SERIALCOMMUNICATION AND DATA
FRAMING
The data coming in at the receiving end of the data line is a serial data
transfer is all 0s and 1s; it is difficult to make sense of the unless the sender and
receiver agree on a set of rules, a protocol, on how data is packet, how many bits
constitute a character, and when the data begins and ends. Asynchronous serial
data communication is widely used for character-oriented transmissions, while
block-oriented data transfers use the synchronous method
Simplex, Half, and Full-Duplex Transfers
62. PROJECT REPORT 62
Government Polytechnic College, Neyyattinkara Electronic & Communication
3.3 POWER SUPPLY
A power supply is a device that supplies electric power to an
electrical load. The term is most commonly applied to electric power converters
that convert one form of electrical energy to another, though it may also refer to
devices that convert another form of energy (mechanical, chemical, solar) to
electrical energy. Aregulated power supply is one that controls the output Voltage
or current to a specific value; the controlled value is held nearly constant despite
Variations in either load current or the Voltage supplied by the power supply’s
energy source
63. PROJECT REPORT 63
Government Polytechnic College, Neyyattinkara Electronic & Communication
TRANSFORMER
Transformers convert AC electricity from one voltage to another with a little
loss of power. Step-up transformers increase voltage, step-down transformers
reduce voltage. Most power supplies use a step-down transformer to reduce the
dangerously high voltage to a safer low voltage.
The input coil is called the primary and the output coil is called the
secondary. There is no electrical connection between the two coils; instead they are
linked by an alternating magnetic field created in the soft-iron core of the
transformer. The two lines in the middle of the circuit symbol represent the core.
Transformers waste very little power so the power out is (almost) equal to the
power in. Note that as voltage is stepped down and current is stepped up.
64. PROJECT REPORT 64
Government Polytechnic College, Neyyattinkara Electronic & Communication
The ratio of the number of turns on each coil, called the turn’s ratio,
determines the ratio of the voltages. A step-down transformer has a large number
of turns on its primary(input) coil which is connected to the high voltage mains
supply, and a small number of turns on its secondary (output) coil to give a low
output voltage.
TURNS RATIO = (Vp / Vs) = (Np / Ns)
Where,
Vp = primary (input) voltage.
Vs = secondary(output) voltage
Np = number of turns on primary coil
Ns = number of turns on secondarycoil
Ip = primary (input) current
Is = secondary (output) current.
RECTIFIER
A rectifier is an electrical device that converts AC, which periodically
reverses direction to DC current that flows in only one direction, a process known
as rectification. Rectifiers have many uses including as components of power
supplies and as detectors of radio signals. Rectifiers may be made of solid state
diodes, vacuum tube diodes, mercury arc valves, and other components. The output
from the transformer is fed to the rectifier. It converts A.C. into pulsating D.C. The
rectifier may be a half wave or a full wave rectifier. In this project, a bridge
65. PROJECT REPORT 65
Government Polytechnic College, Neyyattinkara Electronic & Communication
rectifier is used because of its merits like good stability and full wave rectification.
In positive half cycle only two diodes( 1 set of parallel diodes) will conduct, in
negative half cycle remaining two diodes will conduct and they will conduct only
in forward bias only.
FILTER
Capacitive filter is used in this project. It removes the ripples from the
output of rectifier and smoothens the D.C. Output received from this filter is
constant until the mains voltage and load is maintained constant. However, if either
of the two is varied, D.C. voltage received at this point changes. Therefore a
regulator is applied at the output stage.
The simple capacitor filter is the most basic type of power supply filter. The use of
this filter is very limited. It is sometimes used on extremely high-voltage, low-
66. PROJECT REPORT 66
Government Polytechnic College, Neyyattinkara Electronic & Communication
current power supplies for cathode-ray and similar electron tubes that require very
little load current from the supply. This filter is also used in circuits where the
power-supply ripple frequency is not critical and can be relatively high. Below
figure can show how the capacitor charges and discharges.
VOLTAGE REGULATOR 7805
The LM78XX/LM78XXA series of three-terminal positive regulators are
available in the TO-220/D-PAK package and with several fixed output voltages,
making them useful in a Wide range of applications. Each type employs internal
current limiting, thermal shutdown and safe operating area protection, making it
essentially indestructible. If adequate heat sinking is provided, they can deliver
over 1A output Current. Although designed primarily as fixed voltage regulators,
67. PROJECT REPORT 67
Government Polytechnic College, Neyyattinkara Electronic & Communication
these devices can be used with external components to obtain adjustable voltages
and currents.
3.4 CRYSTAL OSCILLATOR
The crystal oscillator circuit sustains oscillation by taking a voltage signal
from the quartz resonator, amplifying it, and feeding it back to the resonator. The
rate of expansion and contraction of the quartz is the resonant frequency, and is
determined by the cut and size of the crystal. When the energy of the generated
output frequencies matches the losses in the circuit, an oscillation can be sustained.
An oscillator crystal has two electrically conductive plates, with a slice or
tuning fork of quartz crystal sandwiched between them. During startup, the
controlling circuit places the crystal into an unstable equilibrium, and due to the
positive feedback in the system, any tiny fraction of noise is amplified, ramping up
the oscillation. The crystal resonator can also be seen as a highly frequency-
68. PROJECT REPORT 68
Government Polytechnic College, Neyyattinkara Electronic & Communication
selective filter in this system: it only passes a very narrow subband of frequencies
around the resonant one, attenuating everything else. Eventually, only the resonant
frequency is active. As the oscillator amplifies the signals coming out of the
crystal, the signals in the crystal's frequency band becomes stronger, eventually
dominating the output of the oscillator. The narrow resonance band of the quartz
crystal filters out all the unwanted frequencies.
The output frequency of a quartz oscillator can be either that of the fundamental
resonance or of a multiple of that resonance, called a harmonic frequency.
Harmonics are an exact integer multiple of the fundamental frequency. But, like
many other mechanical resonators, crystals exhibit several modes of oscillation,
usually at approximately odd integer multiples of the fundamental frequency.
These are termed "overtone modes", and oscillator circuits can be designed to
excite them. The overtone modes are at frequencies which are approximate, but not
exact odd integer multiples of that of the fundamental mode, and overtone
frequencies are therefore not exact harmonics of the fundamental.
69. PROJECT REPORT 69
Government Polytechnic College, Neyyattinkara Electronic & Communication
MODULE – IV
WORKING & PROGRAMMING
4.1 WORKING
In Wireless Electronic Notice Board the first part is the power supply unit.
Here we use 12-0-12 Step down transformer. This transformer will be step down
the 230V input AC current to 12V AC current. In the system the microcontroller
unit work at 5V DC current. So a voltage regulator is used by the circuit. Before
regulating the voltage level 12V ac is converted to 12V DC using a bridge rectifier
which contains 4 diodes, capacitor of 33uf. This rectifier is convert AC to DC.
Also the pulsating DC is then purified by the cappcitor1000uf will give pure DC .
This 12V DC current will be regulated to 5V DC for ATMEGA32. This will done
by 7805 regulator IC. The regulated 5V DC is applied to ATMEGA32.
The main parts of the Electronic Notice Board system is that the GSM
Module, MAX232, ATMEGA32, LCD 16x2.
GSM module is the one of the part for receiving and transmitting data which
contain SIM port, regulator IC, capacitor (1000uf & 0.3uf), antenna, power and
range indication LEDs. When the power is ON the power LED will be ON. The
other one ranging LED is blinking with a small delay, which indicated ‘No range’.
If it will blink with a long delay indicated attain range. Then we understand GSM
will ready to transmit and receiving the data.
The GSM is connected to a converter of MAX232 which is followed by a
capacitor (104) for detecting unwanted noise and filtering. Then it will connected
to microcontroller unit.. i.e., ATMEGA32. An LCD of 16x2 is connected to
70. PROJECT REPORT 70
Government Polytechnic College, Neyyattinkara Electronic & Communication
microcontroller unit for display of message. Also a buzzer is connected to the
microcontroller unit.
When we send to the message from the mobile, GSM modem which is
receive the message. GSM has no memory location. Only the SIM, inserted by
the SIM port on GSM have the SIM memory location. Hence the received data
will be stored at the SIM location. While the message is arrive the GSM modem
sent. A command serially to the microcontroller unit for indicates a message is
arrived at SIM memory location. The command is just like
+CMT1:”Hi”,3
Here 3 indicated the location of the new message. Now you need to read its
unread message to display on LCD. Hence the microcontroller unit send a another
command to GSM which contain another memory location to store the data at
microcontroller unit. This command will be just like
At+cmgr=3
Here 3 indicated memory location of microcontroller unit to store data form
GSM. When the command return to GSM modem, the received data will be
transmit to microcontroller unit with certain format. The data will be send to
microcontroller unit from GSM through data cable. Cable will connected from
GSM to MAX232. The cable has DB9 connector, which has 3 terminal
transmitting, receiving and Ground. Transmitting terminal from GSM connected
to receiving terminal of MAX232 and the receiving terminal of GSM is connected
to transmitting terminal of MAX232. Hence the data will be send both direction.
That is GSM to MAX232 and vice-versa.
71. PROJECT REPORT 71
Government Polytechnic College, Neyyattinkara Electronic & Communication
When the command from microcontroller unit is received by the GSM. The
data in SIM memory location will be retransmit to microcontroller have location
and is like this format.
UNREAD+9895315198=”Hai”*
Here the phone number indicates from where we get the data. Also at the
end * indicate the keyword. Only the keyword is identity medium of
microcontroller to data. Hence when we send a data or message, should write the
message with a keyword at the end. To identifying the microcontroller the data.
This will only k now by the sender without keyword no matter will display on
LCD.
The command wills directly the memory location in microcontroller for
store the message. From GSM to microcontroller there is a connector MAX232.
GSM is worked at RS logic. But the microcontroller is the TTL logic. The
MAX232 connect the RS232 signals to TTL voltage level that will be acceptance
to the AVR is transmitting and receiving pins. When data is converted form
RS232 to TTL logic data will be filtered by capacitor. They will remove any noise
present in the message data. After filter in message or data will be arrived at
microcontroller memory location. So the data at that memory location that send by
microcontroller unit.
After storing data microcontroller unit will read the data. The command will
be read by,
UNREAD+9898315198=”Hai”*
72. PROJECT REPORT 72
Government Polytechnic College, Neyyattinkara Electronic & Communication
1. Check first two and last two words. UN and AD. Hence it understand the
starting format of data.
2. Check + sign and first and last two digits. This understands from where the
data is send.
3. Then check the keyword. If the keyword of the last data is same pointer
will understand. That the message should be, at before keyword. The data
is understood by the microcontroller unit.
Then, the message sends to LCD module. It will displayed on screen until
the arrival of next message.
The number to which we want to sent to the message is stored in the
ATMEGA32. The crystal oscillator is used for timing. We know that our class
duration is about 1 hour. The time interval is select as 1 hour and during each tike
interval the message will be send to the teachers number that we saved in the
ATMEGA32. For example:
The send message will be “This is your period in EC S6”
A GSM module is used for sending the message. The GSM module has two
indicator LED’s one is power LED and other is range indicator LED. It will
continuously blinks will the module catch range. The LED blinks with a delay.
The GSM module works on 12V DC. The supply to the GSM module is given
from the bridge rectifier. When the period starts. The ATMEGA32 will give a
signal to the GSM module and the GSM module will send the message to the
corresponding number. That is stored in the ATMEGA32. When the message is
want to send a star will appear on the screen. The appeared star will exists until
the message is delivered.
73. PROJECT REPORT 73
Government Polytechnic College, Neyyattinkara Electronic & Communication
4.2 PROGRAME
# i n c l u d e < a v r / i o . h >
# i n c l u d e < s t r i n g . h >
# i n c l u d e < a v r / i n t e r r u p t . h >
# i n c l u d e < u t i l / d e l a y . h >
v o i d d e l a y ( i n t x ) ;
v o i d p o r t _ i n i t i a l ( ) ;
v o i d l c d _ i n i t i a l ( ) ;
v o i d l c d _ c o m m a n d ( c h a r c ) ;
v o i d l c d _ d a t a ( c h a r d ) ;
v o i d l c d _ s t r i n g ( c o n s t c h a r * s ) ;
v o i d u s a r t _ i n i t i a l ( ) ;
v o i d u s a r t _ t r a n s m i t ( c h a r p ) ;
c h a r u s a r t _ r e c e i v e ( ) ;
v o i d u s a r t _ s t r i n g ( c o n s t c h a r * q ) ;
v o i d t i m e r _ i n i t i a l ( v o i d ) ;
v o i d h e x _ a s c i i ( c h a r u ) ;
v o i d g s m _ i n i t i a l ( v o i d ) ;
v o i d m e s s a g e ( ) ;
c h a r a , b , y [ 2 5 ] , g s m _ d a t a [ 2 0 ] = " A T + C M G R = " , g s m _ d e l e
t e [ 2 0 ] = " A T + C M G D = " ;
c h a r n u m b e r [ 1 2 ] ;
c h a r u s a r t _ d a t a , d u m m y _ d a t a , k ;
74. PROJECT REPORT 74
Government Polytechnic College, Neyyattinkara Electronic & Communication
c h a r m s g _ r e c e i v e [ 1 5 ] , m s g _ l o c a t i o n , m s g _ d a t a [ 1 0 ] ;
c h a r d e l e t e [ 5 ] = " d l t " ;
i n t z = 0 ;
c h a r c o n [ 5 ] ;
c h a r s e c o n d = 0 ;
c h a r m i n u t e = 0 ;
c h a r f l a g = 1 ;
c h a r b u z = 0 ;
v o i d m a i n ( )
{po r t _ i n i t i a l ( ) ;
l c d _ i n i t i a l ( ) ;
u s a r t _ i n i t i a l ( ) ;
t i m e r _ i n i t i a l ( ) ;
l c d _ s t r i n g ( " W I R E L E S S " ) ;
l c d _ c o m m a n d ( 0 x c 0 ) ;
l c d _ s t r i n g ( " N O T I C E B O A R D " ) ;
g s m _ i n i t i a l ( ) ;
l c d _ c o m m a n d ( 0 x 0 1 ) ;
l c d _ s t r i n g ( " T i m e : 0 0 : 0 0 H : " ) ;
s e i ( ) ;
w h i l e ( 1 )
{
75. PROJECT REPORT 75
Government Polytechnic College, Neyyattinkara Electronic & Communication
i f ( m i n u t e = = 0 & & s e c o n d = = 1 )
{
P O R T A = 0 X F F ;
_ d e l a y _ m s ( 1 5 0 0 ) ;
P O R T A = 0 X 0 0 ;
l c d _ c o m m a n d ( 0 X 8 b ) ;
l c d _ s t r i n g ( " * " ) ;
m e s s a g e ( ) ;
}
i f ( m i n u t e = = 1 & & s e c o n d = = 1 )
{
P O R T A = 0 X F F ;
_ d e l a y _ m s ( 1 5 0 0 ) ;
P O R T A = 0 X 0 0 ;
l c d _ c o m m a n d ( 0 X 8 b ) ;
l c d _ s t r i n g ( " * " ) ;
m e s s a g e ( ) ;
}
i f ( m i n u t e = = 2 & & s e c o n d = = 1 )
{
P O R T A = 0 X F F ;
_ d e l a y _ m s ( 1 5 0 0 ) ;
P O R T A = 0 X 0 0 ;
l c d _ c o m m a n d ( 0 X 8 b ) ;
l c d _ s t r i n g ( " * " ) ;
76. PROJECT REPORT 76
Government Polytechnic College, Neyyattinkara Electronic & Communication
m e s s a g e ( ) ;
}
i f ( m i n u t e = = 3 & & s e c o n d = = 1 )
{
P O R T A = 0 X F F ;
_ d e l a y _ m s ( 1 5 0 0 ) ;
P O R T A = 0 X 0 0 ;
l c d _ c o m m a n d ( 0 X 8 b ) ;
l c d _ s t r i n g ( " * " ) ;
m e s s a g e ( ) ;
}
i f ( m i n u t e = = 4 & & s e c o n d = = 1 )
{
P O R T A = 0 X F F ;
_ d e l a y _ m s ( 1 5 0 0 ) ;
P O R T A = 0 X 0 0 ;
l c d _ c o m m a n d ( 0 X 8 b ) ;
l c d _ s t r i n g ( " * " ) ;
m e s s a g e ( ) ;
}
i f ( b u z = = 1 )
{
P O R T A = 0 X F F ;
_ d e l a y _ m s ( 5 0 0 ) ;
P O R T A = 0 X 0 0 ;
77. PROJECT REPORT 77
Government Polytechnic College, Neyyattinkara Electronic & Communication
_ d e l a y _ m s ( 5 0 0 ) ;
P O R T A = 0 X F F ;
_ d e l a y _ m s ( 5 0 0 ) ;
P O R T A = 0 X 0 0 ;
_ d e l a y _ m s ( 5 0 0 ) ;
P O R T A = 0 X F F ;
_ d e l a y _ m s ( 5 0 0 ) ;
P O R T A = 0 X 0 0 ;
_ d e l a y _ m s ( 5 0 0 ) ;
P O R T A = 0 X F F ;
_ d e l a y _ m s ( 5 0 0 ) ;
P O R T A = 0 X 0 0 ;
b u z = 0 ;
}
}
}
IS R ( U S A R T _ R X C _ v e c t )
{
c l i ( ) ;
u s a r t _ d a t a = U D R ;
i f ( u s a r t _ d a t a = = ' + ' )
{
f o r ( i n t i = 0 ; i < 1 2 ; i + + )
{
m s g _ r e c e i v e [ i ] = u s a r t _ r e c e i v e ( ) ;
78. PROJECT REPORT 78
Government Polytechnic College, Neyyattinkara Electronic & Communication
}
m s g _ l o c a t i o n = m s g _ r e c e i v e [ 1 1 ] ;
l c d _ c o m m a n d ( 0 X C 0 ) ;
l c d _ s t r i n g ( " " ) ;
d e l a y ( 5 ) ;
u s a r t _ s t r i n g ( " A T + C M G R = " ) ;
u s a r t _ t r a n s m i t ( m s g _ l o c a t i o n ) ;
d e l a y ( 1 0 ) ;
u s a r t _ t r a n s m i t ( 0 x 0 D ) ;
u s a r t _ t r a n s m i t ( 0 x 0 A ) ;
w h i l e ( u s a r t _ r e c e i v e ( ) ! = ' R ' ) ;
w h i l e ( u s a r t _ r e c e i v e ( ) ! = ' E ' ) ;
w h i l e ( u s a r t _ r e c e i v e ( ) ! = ' 9 ' ) ;
w h i l e ( u s a r t _ r e c e i v e ( ) ! = ' 1 ' ) ;
w h i l e ( u s a r t _ r e c e i v e ( ) ! = 0 x 0 A ) ;
f o r ( k = 0 ; y [ k - 1 ] ! = ' * ' ; k + + )
{
y [ k ] = u s a r t _ r e c e i v e ( ) ;
}
y [ k - 1 ] = ' 0 ' ;
l c d _ c o m m a n d ( 0 X C 0 ) ;
l c d _ s t r i n g ( y ) ;
b u z = 1 ;
u s a r t _ s t r i n g ( " A T + C M G D = " ) ;
d e l a y ( 1 0 ) ;
79. PROJECT REPORT 79
Government Polytechnic College, Neyyattinkara Electronic & Communication
u s a r t _ t r a n s m i t ( m s g _ l o c a t i o n ) ;
u s a r t _ t r a n s m i t ( 0 x 0 D ) ;
u s a r t _ t r a n s m i t ( 0 x 0 A ) ;
}
s e i ( ) ;
}
IS R ( T I M E R 1 _ O V F _ v e c t )
{
cl i ( ) ;
s e c o n d + + ;
i f ( s e c o n d > 5 9 )
{
s e c o n d = 0 ;
m i n u t e + + ;
f l a g + + ;
}
i f ( m i n u t e < 5 )
{
h e x _ a s c i i ( m i n u t e ) ;
l c d _ c o m m a n d ( 0 x 8 5 ) ;
l c d _ s t r i n g ( c o n ) ;
l c d _ d a t a ( ' : ' ) ;
80. PROJECT REPORT 80
Government Polytechnic College, Neyyattinkara Electronic & Communication
h e x _ a s c i i ( s e c o n d ) ;
l c d _ c o m m a n d ( 0 x 8 8 ) ;
l c d _ s t r i n g ( c o n ) ;
h e x _ a s c i i ( f l a g ) ;
l c d _ c o m m a n d ( 0 x 8 E ) ;
l c d _ s t r i n g ( c o n ) ;
}
i f ( m i n u t e = = 5 )
{
s e c o n d = 0 ;
m i n u t e = 0 ;
f l a g = 1 ;
l c d _ c o m m a n d ( 0 x c 0 ) ;
l c d _ s t r i n g ( " " ) ;
}
T C N T 1 L = 0 x F F ;
T C N T 1 H = 0 x 0 0 ;
s e i ( ) ;
}
vo i d d e l a y ( i n t x )
{
in t i , j ;
f o r ( j = 0 ; j < x ; j + + )
81. PROJECT REPORT 81
Government Polytechnic College, Neyyattinkara Electronic & Communication
f o r ( i = 0 ; i < 1 0 0 0 ; i + + ) ;
}
vo i d p o r t _ i n i t i a l ( v o i d )
{
DD R A = 0 X F F ;
D D R B = 0 x 0 0 ;
D D R C = 0 x F F ;
D D R D = 0 x F 0 ;
}
vo i d l c d _ i n i t i a l ( )
{
lc d _ c o m m a n d ( 0 x 0 1 ) ;
l c d _ c o m m a n d ( 0 x 8 0 ) ;
l c d _ c o m m a n d ( 0 x 0 6 ) ;
l c d _ c o m m a n d ( 0 x 0 C ) ;
l c d _ c o m m a n d ( 0 x 3 8 ) ;
}
vo i d l c d _ c o m m a n d ( c h a r c )
{
PO R T C = c ;
P O R T D & = ~ ( 1 < < 6 ) ;
P O R T D | = ( 1 < < 7 ) ;
d e l a y ( 2 ) ;
P O R T D & = ~ ( 1 < < 7 ) ;
}
82. PROJECT REPORT 82
Government Polytechnic College, Neyyattinkara Electronic & Communication
vo i d l c d _ d a t a ( c h a r d )
{
PO R T C = d ;
P O R T D | = ( 1 < < 6 ) ;
P O R T D | = ( 1 < < 7 ) ;
d e l a y ( 2 ) ;
P O R T D & = ~ ( 1 < < 7 ) ;
}
vo i d l c d _ s t r i n g ( c o n s t c h a r * s )
{
whi l e ( * s )
{
l c d _ d a t a ( * s + + ) ;
}
}
vo i d u s a r t _ i n i t i a l ( v o i d )
{
U C S R A = 0 X 0 0 ;
U C S R B = 0 X 9 8 ;
U C S R C = 0 X 0 6 ;
U B R R L = 0 X 1 9 ;
U B R R H = 0 X 0 0 ;
}
ch a r u s a r t _ r e c e i v e ( v o i d )
{
whi l e ( ( U C S R A & ( 1 < < R X C ) ) = = 0 ) ;
U C S R A & = ~ ( 1 < < R X C ) ;
83. PROJECT REPORT 83
Government Polytechnic College, Neyyattinkara Electronic & Communication
r e t u r n ( U D R ) ;
}
vo i d u s a r t _ t r a n s m i t ( c h a r t )
{
UD R = t ;
w h i l e ( ( U C S R A & ( 1 < < T X C ) ) = = 0 ) ;
U C S R A | = ( 1 < < T X C ) ;
}
vo i d u s a r t _ s t r i n g ( c o n s t c h a r * s )
{
whi l e ( * s )
{
u s a r t _ t r a n s m i t ( * s + + ) ;
d e l a y ( 3 0 ) ;
}
}
vo i d t i m e r _ i n i t i a l ( )
{
TC C R 1 A = 0 x 0 0 ;
T I M S K | = ( 1 < < T O I E 1 ) ;
T C N T 1 L = 0 x f 0 ;
T C N T 1 H = 0 x 0 0 ;
T C C R 1 B = ( ( 1 < < C S 1 1 ) | ( 1 < < C S 1 0 ) ) ;
}
vo i d h e x _ a s c i i ( c h a r u )
{
c o n [ 2 ] = ' 0 ' ;
84. PROJECT REPORT 84
Government Polytechnic College, Neyyattinkara Electronic & Communication
c o n [ 1 ] = ( u % 1 0 ) + 0 x 3 0 ;
c o n [ 0 ] = ( u / 1 0 ) + 0 x 3 0 ;
}
vo i d g s m _ i n i t i a l ( v o i d )
{
us a r t _ s t r i n g ( " A T " ) ;
u s a r t _ t r a n s m i t ( 0 x 0 D ) ;
u s a r t _ t r a n s m i t ( 0 x 0 A ) ;
d e l a y ( 3 0 ) ;
u s a r t _ s t r i n g ( " A T + C M G F = 1 " ) ;
u s a r t _ t r a n s m i t ( 0 x 0 D ) ;
u s a r t _ t r a n s m i t ( 0 x 0 A ) ;
d e l a y ( 3 0 ) ;
u s a r t _ s t r i n g ( " A T + C S A S = 0 " ) ;
u s a r t _ t r a n s m i t ( 0 x 0 D ) ;
u s a r t _ t r a n s m i t ( 0 x 0 A ) ;
d e l a y ( 3 0 ) ;
u s a r t _ s t r i n g ( " A T + C M G D = 1 " ) ;
u s a r t _ t r a n s m i t ( 0 x 0 D ) ;
u s a r t _ t r a n s m i t ( 0 x 0 A ) ;
d e l a y ( 3 0 ) ;
u s a r t _ s t r i n g ( " A T + C M G D = 2 " ) ;
u s a r t _ t r a n s m i t ( 0 x 0 D ) ;
u s a r t _ t r a n s m i t ( 0 x 0 A ) ;
d e l a y ( 3 0 ) ;
}
85. PROJECT REPORT 85
Government Polytechnic College, Neyyattinkara Electronic & Communication
vo i d m e s s a g e ( )
{
UC S R B & = ~ ( 1 < < 7 ) ;
u s a r t _ t r a n s m i t ( 0 X 0 D ) ;
u s a r t _ t r a n s m i t ( 0 X 0 A ) ;
u s a r t _ s t r i n g ( " A T + C M G S = " ) ;
u s a r t _ t r a n s m i t ( ' " ' ) ;
i f ( f l a g = = 5 )
u s a r t _ s t r i n g ( " 8 5 9 0 3 9 8 8 9 7 " ) ;
i f ( f l a g = = 1 )
u s a r t _ s t r i n g ( " 9 9 4 6 4 6 7 6 5 1 " ) ;
i f ( f l a g = = 2 )
u s a r t _ s t r i n g ( " 8 6 0 6 5 2 3 5 5 7 " ) ;
i f ( f l a g = = 4 )
u s a r t _ s t r i n g ( " 8 2 8 1 3 6 2 2 0 2 " ) ;
i f ( f l a g = = 3 )
u s a r t _ s t r i n g ( " 8 5 9 4 0 9 0 2 3 3 " ) ;
u s a r t _ t r a n s m i t ( ' " ' ) ;
u s a r t _ t r a n s m i t ( 0 X 0 D ) ;
u s a r t _ t r a n s m i t ( 0 X 0 A ) ;
u s a r t _ s t r i n g ( " Y o u r p e r i o d i n E C S 6 " ) ;
u s a r t _ t r a n s m i t ( 0 X 0 D ) ;
u s a r t _ t r a n s m i t ( 0 X 0 A ) ;
u s a r t _ s t r i n g ( " - P r i n c i p a l " ) ;
86. PROJECT REPORT 86
Government Polytechnic College, Neyyattinkara Electronic & Communication
u s a r t _ t r a n s m i t ( 0 X 0 D ) ;
u s a r t _ t r a n s m i t ( 0 X 0 A ) ;
u s a r t _ t r a n s m i t ( 0 X 1 A ) ;
u s a r t _ t r a n s m i t ( 0 X 1 A ) ;
w h i l e ( u s a r t _ r e c e i v e ( ) ! = ' + ' ) ;
l c d _ c o m m a n d ( 0 x 8 b ) ;
l c d _ s t r i n g ( " " ) ;
U C S R B | = ( 1 < < 7 ) ;
}
87. PROJECT REPORT 87
Government Polytechnic College, Neyyattinkara Electronic & Communication
CONCLUSION
The prototype of the GSM based display electronic notice board can be
efficiently designed. This prototype has facilities to be integrated with a display
board thus making it truly mobile. The toolkit accepts the SMS, stores it, validates
it and then displays it in the LCD module. The SMS is deleted from the phone each
time it is read, thus making room for the next SMS. The major constraints
incorporated are the use of ‘*’ as the termination character of the SMS and the
display of one SMS as at a time. These limitations can be removed by the use of
higher end microcontrollers and extended RAM. The prototype can be
implemented using commercial display boards.
88. PROJECT REPORT 88
Government Polytechnic College, Neyyattinkara Electronic & Communication
REFERENCE
1. Sauter, Martin (21 Nov 2013). "TheGSM Logo: The Mystery of the 4 Dots
Solved". Retrieved 23 Nov 2013. [...]here's what[Yngve Zetterstrom,
rapporteur of the Maketing and Planning (MP) group of the MoU
(Memorandum of Understandinggroup, laterto become the GSM
Association (GSMA)) in 1989]had to say to solve the mystery: '[Thedots
symbolize] three [clients] in the home network and one roaming client.'
There you go, an answer from the prime source!
2. Jump up^ Anton A. Huurdeman, The Worldwide History of
Telecommunications, John Wiley & Sons, 31 juli 2003, page 529
3. Jump up^ "GSM Globalsystem for Mobile Communications". 4G
Americas. Archived from the original on 8 February2014. Retrieved 2014-
03-22.
4. Jump up^ EU Seeks To End Mandatory GSM for 900Mhz - Source
5. Jump up^ Leader(7 September 2007). "Happy20th Birthday,
GSM". zdnet.co.uk. CBS Interactive. Archived from the original on 5 May
2011. Retrieved 5 May 2011. Before GSM, Europehad a disastrous
mishmash of nationalanaloguestandardsin phones and TV, designed to
protect nationalindustries but instead creating fragmented markets
vulnerable to big gunsfrom abroad.
6. ^ Jump up to:a b "GSM". etsi.org. European TelecommunicationsStandards
Institute. 2011. Archived from the original on 5 May 2011. Retrieved 5
May 2011. GSM wasdesigned principallyfor voice telephony, but a range
of bearer services was defined...allowing circuit-switched data connections
at up to 9600 bits/s.