Sie sind auf Seite 1von 13

Interfacing Zigbee with 8051 www.pantechsolutions.

net

ZIGBEE ZigBee is a specification for a suite of high level communication protocols usin g small, low-power digital radios based on the IEEE 802.15.4-2003 standard for w ireless personal area networks (WPANs) ZigBee is a low data rate, two-way standa rd for industrial and domestic automation networks. It uses small very low-power devices to connect together to form a wireless control web. The standard suppor ts 2.4GHz unlicensed radio bands. Popular name for the IEEE 802.15.4 standard fo r an extremely low power, and low bit rate wireless PAN technology, Zigbee is de signed for wireless automation and other lower data tasks, such as smart home au tomation and remote monitoring. Technology beyond the Dreams Copyright 2006 Pantech Solutions Pvt Ltd.

Preface Zigbee Evaluation Board The low-power XBee 802.15.4 and extended-range XBee-PRO 802.15.4 use the IEEE 80 2.15.4 networking protocol for fast point-to-multipoint or peer-to-peer networki ng. The XBee 802.15.4 platform features: low-power point-to-multipoint/peer-to-p eer 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 Ltd.

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 Kb ps Operating frequency: 2.4 GHz Receiver sensitivity: -92 dBm Technology beyond the Dreams Copyright 2006 Pantech Solutions Pvt Ltd.

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 Chann el 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 Ltd.

Board Layout Technology beyond the Dreams Copyright 2006 Pantech Solutions Pvt Ltd.

Zigbee with Host PC Hell o! 2.4GHz RF Communica tion Hell o! Technology beyond the Dreams Copyright 2008 Copyright 2006 Pantech Solutions Pvt Ltd. Confidential

zigbee interface with 8051 Technology beyond the Dreams Copyright 2006 Pantech Solutions Pvt Ltd.

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

ZIGBEE C CODE // Connect the zigbee board with the controller using serial port cable // Conne ct 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 declar ations for I/O functions */ void serial_init(void); void serial_init(void) { SCO N = 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 Ltd.

C CODE CONTD TH1 = 0xFD; /* TH1: reload value for 9600 baud @ 11.0592MHz*/ TR1 = 1; /* TR1: t imer 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 Wo rld" */ } } Technology beyond the Dreams Copyright 2006 Pantech Solutions Pvt Ltd.

For More Tutorials www.pantechsolutions.net http://www.slideshare.net/pantechsolutions http://www.s cribd.com/pantechsolutions http://www.youtube.com/pantechsolutions Technology beyond the Dreams Copyright 2006 Pantech Solutions Pvt Ltd.

Das könnte Ihnen auch gefallen