Beruflich Dokumente
Kultur Dokumente
1. INTRODUCTION
1.1EMBEDDED SYSTEMS
An Embedded System is a combination of computer hardware and software, and
perhaps additional mechanical or other parts, designed to perform a specific function.
An embedded system is a microcontroller-based, software driven, reliable, real-time
control system, autonomous, or human or network interactive, operating on diverse
physical variables and in diverse environments and sold into a competitive and cost
conscious market.
An embedded system is not a computer system that is used primarily for processing,
not a software system on PC or UNIX, not a traditional business or scientific
application. High-end embedded & lower end embedded systems. High-end
embedded system - Generally 32, 64 Bit Controllers used with OS. Examples Personal
Digital Assistant and Mobile phones etc. Lower end embedded systems - Generally 8,
16 Bit Controllers used with a minimal operating systems and hardware layout
designed for the specific purpose. Examples Small controllers and devices in our
everyday life like Washing Machine, Microwave Ovens, where they are embedded in.
Throughput – Our system may need to handle a lot of data in a short period of
time.
Response–Our system may need to react to events quickly.
Testability–Setting up equipment to test embedded software can be difficult.
Memory space – Memory is limited on embedded systems, and you must make
the software and the data fit into whatever memory exists.
Program installation – you will need special tools to get your software into
embedded systems.
1
WIRELESS NOTICE BOARD USING ZIGBEE
Power consumption – Portable systems must run on battery power, and the
software in these systems must conserve power.
Processor hogs – computing that requires large amounts of CPU time can
complicate the response problem.
Cost – Reducing the cost of the hardware is a concern in many embedded system
projects; software often operates on hardware that is barely adequate for the job.
Embedded systems have a microprocessor/ microcontroller and a memory. Some
have a serial port or a network connection. They usually do not have keyboards,
screens or disk drives.
1.3 APPLICATIONS
Military and aerospace embedded software applications.
Communication applications.
Industrial automation and process control software.
Mastering the complexity of applications.
Reduction of product design time.
Real time processing of ever increasing amounts of data.
Intelligent, autonomous sensors.
1.4 CLASSIFICATION
Real Time Systems.
RTS is one which has to respond to events within a specified deadline.
A right answer after the dead line is a wrong answer.
1.4.1 RTS CLASSIFICATION
Hard Real Time Systems.
"Soft" real-time systems have reduced constrains on "lateness" but still must
operate very quickly and repeatable.
Example: Railway reservation system – takes a few extra seconds the data
remains valid.
2
WIRELESS NOTICE BOARD USING ZIGBEE
2. LITERATURE SURVEY
In practice, many educational institute uses paper notice board and they appoint
particular person to maintain such board. Some other commercial offices and institute
also use GSM based notice board but in that system there is no provision to retrieve
message after power failure and those system can display garbage message on notice
board when SIM receive company’s offer or wrong person’s message. Everyone who
knows that SIM no. can access that notice board.
In Existing GSM based system the system don’t have provision to retrieve message.
And whenever message from company or other person come on that SIM card, system
display garbage message on notice board. All this drawback of existing system
overcome in proposed system
2.2 SOLUTION
In our proposed system, we proposed model of wireless notice board which uses Zig
Bee modules for transmit and receive notice message from PC to display board.
Notice message from PC is send to ARM board serially through terminal software and
message is saved in EEPROM of the ARM. And this messaged is display on notice
board which is serially connected to ARM.
2.3 DESCRIPTION
Notice boards play a vital role mostly in educational institutions. The events,
occasions or any news, which has to be passed to the students, will be written on the
notice boards present in every floor in the colleges or schools. The present system is
like, a person will be told the news and he has to update this news on all the notice
boards present in the college or school. This will be seen mostly during the
examination seasons.
The time table or the schedule of the exams has to be given to the students. This will
be done by writing the details on the notice boards. But this process consumes a lot
time to update the news on all the notice boards and there may be chances that the
person responsible may commit some mistakes or he may be absent sometimes. So,
this may create disturbances and the entire schedule may be disturbed. To avoid all
3
WIRELESS NOTICE BOARD USING ZIGBEE
these, Wireless Notice Board have been designed which completely eliminates the
manual work.
This project uses the wireless communication, Zig bee. The Zigbee transmitter will be
present at the Principal or the person related to the issues to be displayed on the notice
board. PC keyboard is used as the input device here in this project. Whenever the user
wants to send the news updated to the notice board, he types that particular message
using keyboard and the same data will be transmitted through Zigbee transmitter.
At the receiving end, the Zigbee receiver and the decoder will be fixed to the display
panel. The receiver receives the data coming from the transmitter and the same data
will be received by the microcontroller at the receiver end. The microcontroller sends
this data to the display unit and thus the message given by the user at the transmitter
Nr end will be displayed.
4
WIRELESS NOTICE BOARD USING ZIGBEE
AIM
ABSTRACT
The Data Transfer or Receive in wired communication. Now the data transfer or
receive in Wireless communication. This project is used to Transfer the data Using
Wireless Communication. Wireless communication is best communication compare to
wired communication.
In early days, the speed of the Data is controlled only through Wired
Communication. But it is possible to the Data transfer or Receiver of the data from the
Wireless Communication.
Transmitter Section:
Power Supply
5
WIRELESS NOTICE BOARD USING ZIGBEE
3.2 Description
6
WIRELESS NOTICE BOARD USING ZIGBEE
7
WIRELESS NOTICE BOARD USING ZIGBEE
3.4.1 APPLICATIONS
Educational institutions & organizations
Managing traffic
Advertisement Conference hall
Bus/Railway station
Any Public utility place
3.4.2 ADVANTAGES
3.4.3 DISADVANTAGES
The data may be received by another ZigBee having same PAN-ID. The range is
small. Low transmission rate: As seen in the table above, the transmission rate of
ZigBee is very small as compared to the other wireless technologies. ZigBee compliant
manufacturers slow to make an appearance in the market. ZigBee compliance
certification for appliance manufacturers mandates lithium battery use.
Replacement of existing appliances with ZigBee compliant appliances can be cost.
8
WIRELESS NOTICE BOARD USING ZIGBEE
4. HARDWARE REQUIREMENTS
HARDWARE COMPONENTS
Power supply
Microcontroller
LCD
Keyboard interface with microcontroller
Buzzer
Zigbee trans receiver
Transformer
Rectifier
Capacitor(Smoothing)
Voltage Regulator
When AC is applied to the primary winding of the power transformer it can either be
stepped down or up depending on the value of DC needed. In our circuit the transformer
of 230v/15-0-15v is used to perform the step down operation where a 230V AC appears
as 15V AC across the secondary winding. One alteration of input causes the top of the
transformer to be positive and the bottom negative. The next alteration will temporarily
cause the reverse. The current rating of the transformer used in our project is 2A. Apart
from stepping down AC voltages, it gives isolation between the power source and
power supply circuitries
9
WIRELESS NOTICE BOARD USING ZIGBEE
4.1.2 Rectifier
In the power supply unit, rectification is normally achieved using a solid state diode.
Diode has the property that will let the electron flow easily in one direction at proper
biasing condition. As AC is applied to the diode, electrons only flow when the anode
and cathode is negative. Reversing the polarity of voltage will not permit electron flow.
A commonly used circuit for supplying large amounts of DC power is the bridge
rectifier. A bridge rectifier of four diodes (4*IN4007) are used to achieve full wave
rectification. Two diodes will conduct during the negative cycle and the other two will
conduct during the positive half cycle. The DC voltage appearing across the output
terminals of the bridge rectifier will be somewhat less than 90% of the applied rms
value. Normally one alteration of the input voltage will reverse the polarities. Opposite
ends of the transformer will therefore always be 180 degree out of phase with each
other.
For a positive cycle, two diodes are connected to the positive voltage at the top
winding and only one diode conducts. At the same time one of the other two diodes
conducts for the negative voltage that is applied from the bottom winding due to the
forward bias for that diode. In this circuit due to positive half cycleD1 & D2 will
conduct to give 10.8v pulsating DC. The DC output has a ripple frequency of 100Hz.
10
WIRELESS NOTICE BOARD USING ZIGBEE
Since each altercation produces a resulting output pulse, frequency = 2*50 Hz. The
output obtained is not a pure DC and therefore filtration has to be done.
4.1.3 Capacitor
Filter circuits which are usually a capacitor acting as a surge arrester always follow the
rectifier unit. This capacitor is also called as a decoupling capacitor or a bypassing
capacitor, is used not only to ‘short’ the ripple with frequency of 120Hz to ground but
also to leave the frequency of the DC to appear at the output. A load resistor R1 is
connected so that a reference to the ground is maintained. C1R1 is for bypassing
ripples. C2R2 is used as a low pass filter, i.e. it passes only low frequency signals and
bypasses high frequency signals. The load resistor should be 1% to 2.5% of the load.
11
WIRELESS NOTICE BOARD USING ZIGBEE
The voltage regulators play an important role in any power supply unit. The primary
purpose of a regulator is to aid the rectifier and filter circuit in providing a constant DC
voltage to the device. Power supplies without regulators have an inherent problem of
changing DC voltage values due to variations in the load or due to fluctuations in the
AC liner voltage. With a regulator connected to the DC output, the voltage can be
maintained within a close tolerant region of the desired output. IC7812 and 7805 is used
in this project for providing +12V and +5V supply.
12
WIRELESS NOTICE BOARD USING ZIGBEE
13
WIRELESS NOTICE BOARD USING ZIGBEE
14
WIRELESS NOTICE BOARD USING ZIGBEE
15
WIRELESS NOTICE BOARD USING ZIGBEE
Oscillator Connections
The “R” registers: The “R” registers are a set of eight registers that are
named R0, R1. Etc. up to R7. These registers are used as auxiliary registers in
many operations.
The “B” registers: The “B” register is very similar to the accumulator in
the sense that it may hold an 8-bit (1-byte) value. Two only uses the “B” register
8051 instructions: MUL AB and DIV AB.
The Data Pointer: The Data pointer (DPTR) is the 8051’s only user
accessible 16-bit (2Bytes) register. The accumulator, “R” registers are all
1-Byte values. DPTR, as the name suggests, is used to point to data. It is used by
a number of commands, which allow the 8051 to access external memory.
16
WIRELESS NOTICE BOARD USING ZIGBEE
The program counter (PC) is a 2-byte address, which tells the 8051 where the
next instruction to execute is found in memory. The stack pointer like all
registers except DPTR and PC may hold an 8-bit (1-Byte) value
ADDRESSING MODES:
An “addressing mode” refers that you are addressing a given memory location.
In summary, the addressing modes are as follows, with an example of each of
these addressing modes provides important flexibility.
Indexed Addressing
Timer 2 Registers:
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 .
17
WIRELESS NOTICE BOARD USING ZIGBEE
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. Timer 2 has three operating Modes : capture ,
auto-reload ( up or down Counting ) , and baud rate generator . The
modes are selected by bits in T2CON. Timer 2 consists of two 8-bit registers,
TH2 and TL2.
Capture Mode
In the capture mode , two options are selected by bit EXEN2 in
T2CON . If EXEN2 = 0, Timer 2 is a 16-bit timer or counter which
upon overflow sets bit TF2 in T2CON . This bit can then be used to
generate an interrupt. If EXEN2 = 1 , Timer 2 performs the same
operation , but a 1-to-0 transition at external input T2EX also
causes the current value in TH2 and TL2 to be captured into
RCAP2H and RCAP2L , respectively
18
WIRELESS NOTICE BOARD USING ZIGBEE
Timer 0
4.3 LCD
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. Each pixel
consists of a column of liquid crystal molecules suspended between two transparent
19
WIRELESS NOTICE BOARD USING ZIGBEE
electrodes, and two polarizing filters, the axes of polarity of which are perpendicular to
each other. Without the liquid crystals between them, light passing through one would
be blocked by the other. The liquid crystal twists the polarization of light entering one
filter to allow it to pass through the other.
Some of the most common LCDs connected to the controllers are 16X1, 16x2 and 20x2
displays. This means 16 characters per line by 1 line 16 characters per line by 2 lines
and 20 characters per line by 2 lines, respectively.
Data can be placed at any location on the LCD. For 16×1 LCD, the address
locations are:
Most microcontrollers require some kind of a human interface. This tutorial describes
one way of doing this i.e. interfacing a standard PS2 keyboard withAt mega
(microcontroller) to display text on a LCD. Two connector types are available, the 5-pin
DIN connector of “5D” type, and the smaller six-pin mini-DIN. The pin assignments
20
WIRELESS NOTICE BOARD USING ZIGBEE
are shown in the figure. The signal lines are open connector, with pull-up resistors
(internal) located in the keyboard.
CONNECTIONS
21
WIRELESS NOTICE BOARD USING ZIGBEE
4.5 BUZZER
22
WIRELESS NOTICE BOARD USING ZIGBEE
In game shows it is also known as a "lockout system," because when one person signals
("buzzes in"), all others are locked out from signaling. Several game shows have large
buzzer buttons which are identified as "plungers".
The word "buzzer" comes from the rasping noise that buzzers made when they were
electromechanical devices, operated from stepped-down AC line voltage at 50 or 60
cycles. Other sounds commonly used to indicate that a button has been pressed are a
ring or a beep.
ZigBee is the name of a specification for a suite of high level communication protocols
using small, low-power digital radios based on the IEEE 802.15.4-2006 standard for
wireless personal area networks (WPANs), such as wireless headphones connecting
with cell phones via short-range radio.
It Operates in 868 MHz in Europe, 915 MHz in USA & Australia, and 2.4 GHz
Elsewhere.
Consumes < 50 Mill watts when Active and <1 Micro watt when in Sleep mode
Attained: Low duty Cycle(0.1%) & Sleep mode which consumes very less
power
23
WIRELESS NOTICE BOARD USING ZIGBEE
MESH NETWORK:
Forms a Mesh Network between nodes, meshing a chain from one device to
another.
TRANSMISSION RANGE:
Transmission Range is 10-100 meters. And this could be extended using Mesh
Network
LOW COST:
System simplicity and flexibility make Zig Bee cost-effective
Low battery storage, absence of memory helps
HIGH RELIABILIY AND AUTOMATION:
Since more nodes, ZigBee’s are easy to deploy, operate reliably without
Human Intervention.
Failure in single node will not affect the entire network.
HIGH SECURITY:
Uses 128 bit AES encryption algorithms for highly secure network.
Very Difficulty to Hack as it’s used for Control and Sensitive Applications
SELF HEALING:
As it is mesh topology, a failure in one node, automatically reroutes the path
through other nodes in the network.
SIZE OF ZIGBEE NETWORK:
Could connect 264 Devices
64 bit IEEE address,
DISADVANTAGE:
Low Data rate(Compared to Other Wireless Protocols)
250 kbps @2.4 GHz, 40 kbps @ 915 MHz, and 20 kbps @868 MHz
4.6.2 Architecture:
Though WPAN implies a reach of only a few meters, 30 feet in the case of Zig Bee, the
network will have several layers, so designed as to enable intrapersonal communication
24
WIRELESS NOTICE BOARD USING ZIGBEE
within the network, connection to a network of higher level and ultimately an uplink to
the Web.
The Zig Bee Standard has evolved standardized sets of solutions, called ‘layers'. These
layers facilitate the features that make Zig Bee very attractive: low cost, easy
implementation, reliable data transfer, short-range operations, very low power
consumption and adequate security features.
1. Network and Application Support layer: The network layer permits growth of
network sans high power transmitters. This layer can handle huge numbers of nodes.
This level in the Zig Bee architecture includes the Zig Bee Device Object (ZDO),
user-defined application profile(s) and the Application Support (APS) sub-layer.
The responsibility of determining the nature of the device (Coordinator / FFD or RFD)
in the network, commencing and replying to binding requests and ensuring a secure
relationship between devices rests with the ZDO (Zigbee Define Object). The
user-defined application refers to the end device that conforms to the Zig Bee Standard.
2. Physical (PHY) layer: The IEEE802.15.4 PHY physical layer accommodates high
levels of integration by using direct sequence to permit simplicity in the analog circuitry
and enable cheaper implementations.
3. Media access control (MAC) layer: The IEEE802.15.4 MAC media access control
layer permits use of several topologies without introducing complexity and is meant to
work with large numbers of devices.
25
WIRELESS NOTICE BOARD USING ZIGBEE
DEVICE TYPES:
Zig Bee coordinator (ZC): Forms the root of the network .There is exactly one
Zig Bee coordinator in each .Can store information about the network, including
acting as the Trust Centre & repository for security keys.
Zig Bee Router (ZR): As well as running an application function a router can
act as an intermediate router, passing data from other devices.
Zig Bee End Device (ZED): Contains just enough functionality to talk to the
parent node only. This relationship allows the node to be asleep a significant
amount of the time thereby giving long battery life.
ZigBee's Device Object (ZDO): A special device in a Zig Bee network responsible for a
number of tasks, which include keeping of device roles, management of requests to join a
network, device discovery and security.
26
WIRELESS NOTICE BOARD USING ZIGBEE
5. SOFTWARE REQUIREMENTS
A project manager.
A make facility.
Tool configuration.
Editor.
A powerful debugger.
27
WIRELESS NOTICE BOARD USING ZIGBEE
dialog shown in the figure below will appear, prompting the user to select a target
device. In this lab, the chip being used is the “AT89C52,” which is listed under the
heading “Atmel”.
Next, Micro Vision must be instructed to generate a HEX file upon program
compilation. A HEX file is a standard file format for storing executable code that is to
be loaded onto the microcontroller. In the “Project Workspace” pane at the left,
right–click on “Target 1” and select “Options for ‘Target 1’ ”.Under the “Output” tab of
the resulting options dialog, ensure that both the “Create Executable” and “Create HEX
File” options are checked. Then click “OK”.
28
WIRELESS NOTICE BOARD USING ZIGBEE
Next, a file must be added to the project that will contain the project code. To do
this, expand the “Target 1” heading, right–click on the “Source Group 1” folder, and
select “Add files…” Create a new blank file (the file name should end in “.asm”), select
it, and click “Add.” The new file should now appear in the “Project Workspace” pane
under the “Source Group 1” folder. Double-click on the newly created file to open it in
the editor. All code for this lab will go in this file. To compile the program, first save all
source files by clicking on the “Save All” button, and then click on the “Rebuild All
Target Files” to compile the program as shown in the figure below. If any errors or
warnings occur during compilation, they will be displayed in the output window at the
bottom of the screen. All errors and warnings will reference the line and column
number in which they occur along with a description of the problem so that they can be
easily located. Note that only errors indicate that the compilation failed, warnings do
not (though it is generally a good idea to look into them anyway).
29
WIRELESS NOTICE BOARD USING ZIGBEE
Fig 5.4: “Save All” and “Build All Target Files” Buttons
When the program has been successfully compiled, it can be simulated using the
integrated debugger in KeilMicroVision. To start the debugger, select
“Debug”=>”Start/Stop Debug Session” from the pull–down menus.
At the left side of the debugger window, a table is displayed containing several
key parameters about the simulated microcontroller, most notably the elapsed time
(circled in the figure below). Just above that, there are several buttons that control code
execution. The “Run” button will cause the program to run continuously until a
breakpoint is reached, whereas the “Step Into” button will execute the next line of code
and then pause (the current position in the program is indicated by a yellow arrow to the
left of the code).
30
WIRELESS NOTICE BOARD USING ZIGBEE
6. PROJECT CODE
TRANSMITTER SECTION
;--Port PIN assignment....
;--Part of this project PC AT Keyboard is accessing--09/05/05
/*=========================================================*/
;-AT key board Key value is displayed on LCD Display..........
; - Checked Final Testing is Ok....21/05/2005..Ok...
;-25/10/2005 &
; This routine is tested all keyboard data entry mode, It displays properly in Row buy Row
; Tested OK....25/10/2005 10:57 PM
/***********************************************************/
LCD_DPort equ P0
LCD_Rs equ P1.5
LCD_RW equ P1.6
LCD_CS equ P1.7
TstLED1 equ P3.2
PKP_Clk equ P3.3
PKP_Dat equ P3.4
/*-----------------------------*/
BSTDdata equ 0300
BSTDBranch equ 0350
BSTDRemarks equ 0400
/*-------------------------------------------*/
; Internal RAM variables
/*---------------------------------*/
;-RAM bit addressable memory assignment
31
WIRELESS NOTICE BOARD USING ZIGBEE
clr EA
mov TH0, #3Ch ;Count for 50mSec Interrupt.
mov TL0, #0AFh
mov TH1, #0FDh ;for Baud rate of 9600bps
mov TL1, #0FDh
mov TMOD,#21h ;T1=8-bit auto reload mode for baud rate generation
mov SCON,#50h ;T0=16-bit timer for 50mSec.
mov TCON,#55h ;Serial TxRx enable
mov IE, #96h ;Global Interrupt enable, Serial ISR,T1,T0,Ex1 services Enable
/*---------------------------------------*/
call Displine1
mov Dptr,#WelCome
call DispTitle
call Displine2
mov Dptr,#My_Name
call DispTitle
32
WIRELESS NOTICE BOARD USING ZIGBEE
call Delay1Sec
call Delay1Sec
call Delay1Sec
call ClearDisp
call Displine1
mov IntCount,#00 ;for Clock Interupt Counter
mov IntBCnt, #00h ;for Byte count
mov P2,#00h
mov R1,#40h
mov R0,#70h
/*************************************/
Main_Loop:
jb FKeyPress,DispChar
ljmp Main_Loop
/*************************************/
;-Routine for display the Charecters on LCD
DispChar:
clr FkeyPress
mov a,TempKey
mov @R0,a
cjne a,#'Z',exitstore
call ClearDisp
call DispLine2
mov R0,#70h
loop:
mov a,@R0
cjne a,#'Z',loopdisp
mov SBUF,#','
call Delay20mSec
mov R0,#70h
call DispLine1
jmp Main_Loop
loopdisp:
mov SBUF,a
call Delay20mSec
call LCD_Data_out
inc R0
jmp loop
exitstore:
call LCD_Data_out
inc R0
jmp exit
exit:
ljmp Main_Loop
/*-----------------------------------*/
ExInt1_ISR:
inc IntCount
33
WIRELESS NOTICE BOARD USING ZIGBEE
mov A,TempKey
cjne IntCount,#10,IntLP1 ;1st r3=1 ==>IntLp1
IntLP1:
jnc IntLP2
setb PKP_Dat ; always set the port b4 reading
mov c,PKP_Dat
rrc a
mov TempKey,A
IntLP2:
cjne IntCount,#11,IntLP3
mov IntCount,#00
inc IntBCnt
cjne IntBCnt,#03,IntLP3
mov IntBCnt,#00
mov a,TempKey
cjne a,#0F0h,DispLp
jmp IntLP3
DispLp:
cjne a,#58h,ChType
cpl FCaps
jmp IntLP3
ChType: jnb FCaps,GetSmall
mov DPTR,#ScanCodeATcap ;move Dptr=Scan Code Lookup Table address
jmp GetCha
GetSmall:
mov DPTR,#ScanCodeATsmall ;move Dptr=Scan Code Lookup Table address
GetCha:
movc a,@a+Dptr
mov TempKey,A
setb FKeyPress
IntLP3:
reti
/*-----------------------------------*/
Serial_ISR:
push PSW
jbc RI,RX_Service
jbc TI,TX_Service
reti
RX_Service:
POP PSW
mov A,sbuf
mov @R1,a
cjne a,#',',rxst
call ClearDisp
call DispLine1
mov R1,#40h
loopr:
mov a,@R1
34
WIRELESS NOTICE BOARD USING ZIGBEE
cjne a,#',',exitr
jmp exitlp
rxst:
inc R1
reti
exitr:
call LCD_Data_out
inc R1
jmp loopr
exitlp:
mov R1,#40h
reti
TX_Service:
clr TI
POP PSW
reti
/*-====----------------------------------------*/
; Timer0 for Every 50mSec Interrupt service routine
Timer0_ISR:
push acc
mov TH0,#3Ch ;Count for 50mSec Interrupt.
mov TL0,#0AFh
inc V50mSec
mov a,V50mSec
cjne a,#04h,End_ISR0
mov V50mSec,#04h
inc V100mSec
mov a,V100mSec
cjne a,#5,End_ISR0
mov V100mSec,#05h
inc VSec
End_ISR0:
pop Acc
reti
/*------------------------------------------*/
;Lcd write command to RS Register
LCD_Cmnd_Out:
call LCD_Busy_Chk
mov LCD_DPort,a
clr LCD_Rs
clr LCD_Rw
setb LCD_CS
NOP
NOP
clr LCD_CS
ret
;LCD write data in to data register
LCD_Data_Out:
call LCD_Busy_Chk
35
WIRELESS NOTICE BOARD USING ZIGBEE
mov LCD_DPort,a
setb LCD_Rs
clr LCD_Rw
setb LCD_CS
NOP
NOP
clr LCD_CS
ret
LCD_Busy_Chk:
clr LCD_CS
mov LCD_DPort,#0ffh
clr LCD_Rs
setb LCD_Rw
Wait: clr LCD_CS
setb LCD_CS
jb P0.7,Wait
clr LCD_CS
ret
/*--------------------------------------------------*/
;Power ON LCD Initialisation programe
LCD_PInialise:
mov a,#38h
call LCD_Cmnd_Out
mov a,#06h
call LCD_Cmnd_Out
mov a,#01h
call LCD_Cmnd_Out
mov a,#0ch
call LCD_Cmnd_Out
ret
/*..............................................*/
; This routine displays the LCD Tittles on display
DispTitle:
clr a
Get_Dat:
movc a,@a+dptr
jz Next1
mov SBUF,a
call Delay20mSec
call LCD_Data_Out
inc dptr
clr a
jmp Get_Dat
Next1: ret
/*-------------------------------------------*/
ClearDisp:
mov a,#01h
36
WIRELESS NOTICE BOARD USING ZIGBEE
call LCD_Cmnd_Out
ret
DispLine1:
mov a,#80h
call LCD_Cmnd_Out
ret
DispLine2:
mov a,#0C0h
call LCD_Cmnd_Out
ret
DispLine3:
mov a,#94h
call LCD_Cmnd_Out
ret
DispLine4:
mov a,#0D4h
call LCD_Cmnd_Out
ret
/*-------------------------------------------*/
;Deay routine
Delay1sec:
mov DlayC1,#8
mov DlayC2,#155
mov DlayC3,#00h
Here1S: djnz DlayC3,Here1S
djnz DlayC2,Here1S
djnz DlayC1,Here1S
ret
Delay500mSec:
mov DlayC1,#4
mov DlayC2,#155
mov DlayC3,#00h
D500ms: djnz DlayC3,D500ms
djnz DlayC2,D500ms
djnz DlayC1,D500ms
ret
Dlay200mSec:
mov DlayC1,#200
mov DlayC2,#00
here_D2:djnz DlayC2,$
djnz dlayC1,here_D2
ret
Delay20mSec:
mov DlayC1,#40
mov DlayC2,#00
here_Dl:djnz DlayC2,$
37
WIRELESS NOTICE BOARD USING ZIGBEE
djnz dlayC1,here_Dl
ret
Delay5uSec:
nop
nop
nop
nop
ret
/*-----------------------------------------------------*/
ScanCodeATcap: ; F3 F1 F2
;0 1 2 3 4 5 6 7 8 9 a b c d e f
DB ' ',' ',' ',' ',04h,05h,06h,',',',',',',',',',',',',',',',','~' ;00-0f
DB ' ',' ',' ',' ',' ','Q','1',' ',' ',' ','Z','S','A','W','2',' ' ;10-1f
DB ' ','C','X','D','E','4','3',' ',' ',' ','V','F','T','R','5',' ' ;20-2f
DB ' ','N','B','H','G','Y','6',' ',' ',' ','M','J','U','7','8',' ' ;30-3f
DB ' ','<','K','I','O','0','9',' ',' ','>','?','L',':','P','_',' ' ;40-4f
DB ' ',' ','"',' ','[','+',' ',' ',' ',' ',5Ah,']',' ','\',' ',' ' ;50-5f
DB ' ',' ',' ',' ',' ',' ',' ',' ',' ','1',' ','4','7',' ',' ',' ' ;60-6f
DB '0',' ','2','5','6','8',76h,77h,' ',' ','3',' ',' ','9',' ',' ' ;70-7f
DB ' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ' ;80-8f
DB ' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ' ;90-9f
DB ' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ' ;a0-af
DB ' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' '
DB ' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' '
DB ' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' '
DB ' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' '
DB ' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' '
DB ' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' '
/*====================================================================
======*/
/*-----------------------------------------------------*/
ScanCodeATsmall: ; F3 F1 F2
;0 1 2 3 4 5 6 7 8 9 a b c d e f
DB ' ',' ',' ',' ',04h,05h,06h,',',',',',',',',',',',',',',',','~' ;00-0f
DB ' ',' ',' ',' ',' ','q','1',' ',' ',' ','z','s','a','w','2',' ' ;10-1f
DB ' ','c','x','d','e','4','3',' ',' ',' ','v','f','t','r','5',' ' ;20-2f
DB ' ','n','b','h','g','y','6',' ',' ',' ','m','j','u','7','8',' ' ;30-3f
DB ' ','<','k','i','o','0','9',' ',' ','>','?','l',':','p','_',' ' ;40-4f
DB ' ',' ','"',' ','[','+',' ',' ',' ',' ',5Ah,']',' ','\',' ',' ' ;50-5f
DB ' ',' ',' ',' ',' ',' ',' ',' ',' ','1',' ','4','7',' ',' ',' ' ;60-6f
DB '0',' ','2','5','6','8',76h,77h,' ',' ','3',' ',' ','9',' ',' ' ;70-7f
DB ' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ' ;80-8f
DB ' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ' ;90-9f
DB ' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ' ;a0-af
DB ' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' '
DB ' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' '
DB ' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' '
DB ' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' '
38
WIRELESS NOTICE BOARD USING ZIGBEE
DB ' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' '
DB ' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' '
/*====================================================================
======*/
END
RECEIVER SECTION
/*....GSM Short Message Service............................*/
/*....Using:Fargo Maestro 20 GSM/GPRS Modem Dual band......*/
/*....Philips 89C51 RD2nb Micro Controller.................*/
/*....Author:G.Satyanarayana...04-05-2005..................*/
/***********************************************************/
;--Port PIN assignment....
;--Part of this project PC AT Keyboard is accessing--09/05/05
/*=========================================================*/
;-AT key board Key value is displayed on LCD Display..........
;- Checked Final Testing is Ok....21/05/2005..Ok...
;-25/10/2005
; this routine is tested all keyboard data entry mode ,It displays properly in Row buy Row
; Tested OK....25/10/2005 10:57 PM
/***********************************************************/
LCD_DPort equ P0
LCD_Rs equ P1.5
LCD_RW equ P1.6
LCD_CS equ P1.7
TstLED1 equ P3.2
PKP_Clk equ P3.3
PKP_Dat equ P3.4
/*-----------------------------*/
BSTDdata equ 0300
BSTDBranch equ 0350
BSTDRemarks equ 0400
/*-------------------------------------------*/
; Internal RAM variables
TempKey Data 30h ; key Pressed Temp value
DlayC1 Data 31h
DlayC2 Data 32h
DlayC3 Data 33h
V50mSec Data 34h
V100mSec Data 35h
VSec Data 36h
IntCount equ r3
IntBCnt equ r4
ScrCount equ r5
/*---------------------------------*/
39
WIRELESS NOTICE BOARD USING ZIGBEE
ORG 0023h
ljmp Serial_ISR
ORG 0100h
Power_On:
mov r0,#00h
mov a,#00h
Lclear_Nxt:
mov @r0,a
inc r0
cjne r0,#7fh,Lclear_Nxt
mov r0,#00h
mov 8Eh,#00h
mov SP,#VStack
mov P3,#0ffh
SETB P2.0
clr EA
mov TH1, #0FDh ;for Baud rate of 9600bps
mov TL1, #0FDh
mov TMOD,#21h ;T1=8-bit auto reload mode for baud rate generation
mov SCON,#50h ;T0=16-bit timer for 50mSec.
setb TR1 ;Serial TxRx enable
mov IE, #90h ;Global Interrupt enable, Serial ISR,T1,T0,Ex1 services Enable
/*---------------------------------------*/
call Displine1
mov Dptr,#WelCome
call DispTitle
call Displine2
mov Dptr,#My_Name
40
WIRELESS NOTICE BOARD USING ZIGBEE
call DispTitle
call Delay1Sec
call Delay1Sec
call Delay1Sec
call ClearDisp
call Displine1
mov R0,#70h
/*----------------------------------*/
Main_Loop:
SETB P2.0
ljmp Main_Loop
/*-----------------------------------*/
Serial_ISR:
push PSW
jbc RI,RX_Service
jbc TI,TX_Service
reti
RX_Service:
CLR P2.0
POP PSW
mov A,sbuf
mov @R0,a
cjne a,#',',rxst
call ClearDisp
call DispLine1
mov R0,#70h
loopr:
mov a,@R0
cjne a,#',',exitr
jmp exitlp
rxst:
inc R0
reti
exitr:
call LCD_Data_out
inc R0
jmp loopr
exitlp:
CALL Delay1sec
mov R0,#70h
reti
TX_Service:
41
WIRELESS NOTICE BOARD USING ZIGBEE
clr TI
POP PSW
reti
/*------------------------------------------*/
;Lcd write command to RS Register
LCD_Cmnd_Out:
call LCD_Busy_Chk
mov LCD_DPort,a
clr LCD_Rs
clr LCD_Rw
setb LCD_CS
NOP
NOP
clr LCD_CS
ret
; LCD write data in to data register
LCD_Data_Out:
call LCD_Busy_Chk
mov LCD_DPort,a
setb LCD_Rs
clr LCD_Rw
setb LCD_CS
NOP
NOP
clr LCD_CS
ret
LCD_Busy_Chk:
clr LCD_CS
mov LCD_DPort,#0ffh
clr LCD_Rs
setb LCD_Rw
Wait: clr LCD_CS
setb LCD_CS
jb P0.7,Wait
clr LCD_CS
ret
/*--------------------------------------------------*/
; Power ON LCD Initialisation programe
LCD_PInialise:
mov a,#38h
call LCD_Cmnd_Out
mov a,#06h
call LCD_Cmnd_Out
mov a,#01h
call LCD_Cmnd_Out
mov a,#0ch
call LCD_Cmnd_Out
ret
42
WIRELESS NOTICE BOARD USING ZIGBEE
/*..............................................*/
; This routine displays the LCD Tittles on display
DispTitle:
clr a
Get_Dat:
movc a,@a+dptr
jz Next1
call LCD_Data_Out
inc dptr
clr a
jmp Get_Dat
Next1: ret
/*-------------------------------------------*/
ClearDisp:
mov a,#01h
call LCD_Cmnd_Out
ret
DispLine1:
mov a,#80h
call LCD_Cmnd_Out
ret
DispLine2:
mov a,#0C0h
call LCD_Cmnd_Out
ret
DispLine3:
mov a,#94h
call LCD_Cmnd_Out
ret
DispLine4:
mov a,#0D4h
call LCD_Cmnd_Out
ret
/*-------------------------------------------*/
;Deay routine
Delay1sec:
mov DlayC1,#8
mov DlayC2,#155
mov DlayC3,#00h
Here1S: djnz DlayC3,Here1S
djnz DlayC2,Here1S
djnz DlayC1,Here1S
ret
Delay500mSec:
mov DlayC1,#4
mov DlayC2,#155
mov DlayC3,#00h
43
WIRELESS NOTICE BOARD USING ZIGBEE
44
WIRELESS NOTICE BOARD USING ZIGBEE
CONCLUSION
The project ―Wireless Notice Board using Zig Bee has been successfully completed and
tested with integration of the features of every hardware component for its development. We
believe that our step is towards complete automation for notice board application which can
be used in colleges, finally we can conclude that this project application gives a very good
feature and there is huge scope for further research and development for using the same with
the help of advanced technology.
FUTURE ASPECTS
Could install Multi Point Receivers as Mesh Network so the all the displays could be
controlled using one coordinator
One more is the use of LED Display Boards instead of and LCD display, which would
be the further improvement in the display and also delimit the number of characters
displayed on the screen.
Multi lingual display can be one of the added variations of the project. The display
boards are one of the single most important media for information transfer to the
maximum number of end users
Only used by authenticated users.
45
WIRELESS NOTICE BOARD USING ZIGBEE
8. BIBLIOGRAPHY
REFERENCES
www.national.com
www.atmel.com
www.microsoftsearch.com
www.geocities.com
www.zilog.com –For Data Sheets of various Components
www.wikepedia.com
www.keil.com/forum/docs/
Texas Instruments data sheets
46
WIRELESS NOTICE BOARD USING ZIGBEE