P. 1
Interfacing zigbee board with 8051

Interfacing zigbee board with 8051

|Views: 2,400|Likes:
Interfacing zigbee board with 8051
Interfacing zigbee board with 8051

More info:

Published by: Pantech ProLabs India Pvt Ltd on Jun 07, 2011
Copyright:Traditional Copyright: All rights reserved

Availability:

Read on Scribd mobile: iPhone, iPad and Android.
download as PPT, TXT or read online from Scribd
See more
See less

09/06/2013

text

original

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

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 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 Kbps ² 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 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 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Œ Confidential ©

Copyright 2008

Copyright © 2006 Pantech Solutions Pvt Ltd.

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 stop bit interfacing with zigbee module. Do this continuously. Solution: MOV MOV MOV SETB MOV ACALL MOV ACALL MOV ACALL SJMP MOV JNB CLR RET TMOD,#20H TH1,#-3 ;9600 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" ;transfer "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 // 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 Ltd.

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

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

You're Reading a Free Preview

Download
scribd
/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->