You are on page 1of 12

Interfacing Zigbee

with 8051

www.pantechsolutions.net
ZIGBEE
• ZigBee is a specification for a suite of high level communication
protocols using small, low-power digital radios based on the IEEE
802.15.4-2003 standard for wireless personal area networks (WPANs)
ZigBee is a low data rate, two-way standard for industrial and domestic
automation networks.
• It uses small very low-power devices to connect together to form a
wireless control web. The standard supports 2.4GHz unlicensed radio
bands.
• Popular name for the IEEE 802.15.4 standard for an extremely low
power, and low bit rate wireless PAN technology, Zigbee is designed
for wireless automation and other lower data tasks, such as smart home
automation and remote monitoring.

Technology beyond the Dreams™ Copyright © 2006 Pantech Solutions Pvt


Preface
• Zigbee Evaluation Board
• The low-power XBee 802.15.4 and extended-range XBee-PRO
802.15.4 use the IEEE 802.15.4 networking protocol for fast point-to-
multipoint or peer-to-peer networking. The XBee 802.15.4 platform
features:
• low-power point-to-multipoint/peer-to-peer networking Fast 250 kbps
RF data rate No configuration needed for out-of-the-box RF
communications 128-bit AES encryption.

Technology beyond the Dreams™ Copyright © 2006 Pantech Solutions Pvt


Specifications
• Module – Xbee | Xbee PRO
– Specifications
– Power output:: 1mW (+0 dBm) International version
– Indoor/Urban range:
• Up to 100 ft (30 m)
• Up to 1 mile (1.6 km) RF LOS (Xbee PRO)
– Outdoor/RF line-of-sight range: Up to 300 ft (90 m)
– RF data rate: 250 Kbps
– Interface data rate: Up to 115.2 Kbps
– Operating frequency: 2.4 GHz
– Receiver sensitivity: -92 dBm

Technology beyond the Dreams™ Copyright © 2006 Pantech Solutions Pvt


Features
• Spread Spectrum type: DSSS (Direct Sequence Spread Spectrum)
• Networking topology: Point-to-point, point-to-multipoint, & peer-to-peer
• Error handling: Retries & acknowledgements
• Filtration options: PAN ID, Channel, and 64-bit addresses
• Channel capacity:
– XBee: 16 Channels
– XBee-PRO: 12 Channels
• Addressing: 65,000 network addresses available for each channel

Technology beyond the Dreams™ Copyright © 2006 Pantech Solutions Pvt


Board Layout

Technology beyond the Dreams™ Copyright © 2006 Pantech Solutions Pvt


Zigbee with Host PC

Hell
o!

2.4GHz RF
Communicati
on

Hell
o!

Technology beyond the Dreams™ Copyright © 2006 Pantech Solutions Pvt


zigbee interface with 8051

Technology beyond the Dreams™ Copyright © 2006 Pantech Solutions Pvt


ZIGBEE INTERFACE
ASSEMBLY CODE
Write a program to transfer the message “YES” serially at 9600 baud, 8bit data, 1 stop bit interfacing
with zigbee module.
Do this continuously.
Solution:
MOV TMOD,#20H ;timer 1, mode 2
MOV TH1,#-3 ;9600 baud
MOV SCON,#50H ;8-bit, 1 stop bit, REN enabled
SETB TR1 ;start timer 1
AGN: MOV A,#"Y" ;transfer "Y"
ACALL XMIT
MOV A,#"E" ;transfer "E"
ACALL XMIT
MOV A,#"S" ;transfer "S"
ACALL XMIT
SJMP AGN ;keep doing it
;serial data transfer subroutine
XMIT: MOV SBUF,A ;load SBUF
HERE: JNB TI,HERE ;wait for last bit to transfer
CLR TI ;get ready for next byte
RET

Technology beyond the Dreams™ Copyright © 2006 Pantech Solutions Pvt


ZIGBEE C CODE
// Connect the zigbee board with the controller using serial port cable
// Connect the second zigbee module to PC using serial port cable . Execute the program the
data is //transferred from between the zigbee modules
#include <REG51.H> /* special function register declarations */
#include <stdio.h> /* prototype declarations for I/O functions */

void serial_init(void);
void serial_init(void)
{
SCON = 0x50; /* SCON: mode 1, 8-bit UART, enable rcvr */
TMOD |= 0x20; /* TMOD: timer 1, mode 2, 8-bit reload */

Technology beyond the Dreams™ Copyright © 2006 Pantech Solutions Pvt


C CODE CONTD

TH1 = 0xFD; /* TH1: reload value for 9600 baud @ 11.0592MHz*/


TR1 = 1; /* TR1: timer 1 run */
TI = 1; void main(void)
{
serial_init();
printf (" PS - PrimerC51 UART Demo\n\n\r");
while (1)
{
printf ("Hello World!! \n\r"); /* Print "Hello World" */
}
}

Technology beyond the Dreams™ Copyright © 2006 Pantech Solutions Pvt


For More Tutorials
www.pantechsolutions.net
http://www.slideshare.net/pantechsolutions
http://www.scribd.com/pantechsolutions
http://www.youtube.com/pantechsolutions

Technology beyond the Dreams™ Copyright © 2006 Pantech Solutions Pvt

You might also like