Interfacing Zigbee With 8051
Interfacing Zigbee With 8051
Contents at a Glance
8051 Primer Board ...........................................................3
ZigBee .............................................................................3
Digi ZigBee.......................................................................4
Interfacing Zigbee ............................................................5
Interfacing Zigbee with 8051 ............................................6
Pin Assignment with 8051 ................................................6
Circuit Diagram to Interface Zigbee with 8051 ..................7
Source Code ....................................................................7
C Program to interface ZigBee with 8051..........................8
Testing the ZigBee with 8051 ......................................... 10
General Information ...................................................... 11
Digi ZigBee
The Digi Xbee 802.15.4 modules are the easiest to use,
most reliable and cost-effective RF devices we've
experienced. The 802.15.4 Xbee modules provide two
friendly modes of communication - a simple serial method
of transmit/receive or a framed mode providing advanced
features. These modules can communicate point to point,
from one point to a PC, or in a mesh network.
Interfacing Zigbee
Fig. 1 shows how to interface the Zigbee with
microcontroller. The Xbee modules work at the 2.4 GHz
frequency which means smaller board and antenna size.
Xbee modules have the ability to transmit Digital, PWM,
Analog or Serial RS232 signals wirelessly. To communicate
over UART or USART, we just need three basic signals which
are namely, RXD (receive), TXD (transmit), GND (common
ground). So to interface UART with 8051, we just need the
basic signals.
ISP PGM
UART0(P1)
8051
Lines
TXD-0
P3.0
RXD-0
P3.1
TXD-1
P1.2
(P2)
UART1
8051
MAX
3232
RXD-1
P1.3
Source Code
The Interfacing ZigBee module with 8051 program is
very simple and straight forward, which communicate a
mobile or any other devices with 8051 Primer Board
through Zigbee module by using UART0. Some delay is
occurring when a single data is sent to mobile through
UART. C programs are written in Keil software. The baud
rate of microcontroller is 9600.
Join the Technical Community Today!
http://www.pantechsolutions.net
//----------------------------------------//
Serial Interrupt Function
//----------------------------------------void serin (void) interrupt 4 //Serial Port Interrupt
{
if(RI==1)
//Receive Interrupt Gets Enabled
{
//after Stop Bit get Received
d=SBUF; //Serial Buffer value moved to a variable
b[j]=d;
SBUF=b[j];
DelayMs(20); //Delay Function
j++;
}
SCON=0X50;
}
//--------------------------------//
Delay Function
//--------------------------------void DelayMs(unsigned int k)
{
unsigned int i;
for(i=0;i<=k;i++);
}
What do we sell?
Our products range from Various Microcontroller
development boards, DSP Boards, FPGA/CPLD boards,
Communication Kits, Power electronics, Basic electronics,
Robotics, Sensors, Electronic components and much more . Our
goal is to make finding the parts and information you need
easier and affordable so you can create awesome projects and
training from Basic to Cutting edge technology.