Professional Documents
Culture Documents
Abstract—ZigBee utilizes IEEE 802.15.4 compliant radios is an optional 32.768kHz crystal, with two loading
operating in the 2.4GHz unlicensed ISM bands, it is an open capacitors(C1 and C2), used for the 32.768kHz crystal
and global standard for wirelessly networked control and oscillator. The 32.768 kHz crystal oscillator is used in
monitoring solutions that are reliable, cost-effective, low-power, applications where we need both very low sleep current
the applications of ZigBee include home and building consumption and accurate wake up times. An external 32MHz
automation, industrial controls and monitoring, energy crystal, Y2, is with two loading capacitors (C5 and C6). The
management and asset tracking. Thus, it is great significance to on chip voltage regulators supply all 1.8V power supply pins
search on it .We have discussed a method how to design and internal power supplies, C3 and C4 are required for
wirelessly Hardware and system software based on MSP430F149
stability of the regulators.
and CC2480, the experimental results show that the modules are
reliable, low-power, self-forming, auto-routing and self-healing. VCC
C1 C2
Y1 C3
Keywords-ZigBee;IEEE802.15.4;CC2480;MSP430F149;wirele 220nF
15pF 1 2 15pF
-ss network
32.768
I. ZIGBEE TECHNOLOGY AND CC2480 MODULES
INTRODUCTION
48
47
46
45
44
43
42
41
40
39
38
37
ZigBee is an open and global standard for wirelessly
networked control and monitoring solutions that are reliable,
DVDD
32K_XOSC_Q1
32K_XOSC_Q2
DCOUPL
AVDD_DREG
AVDD_DGUARD
AVDD_IF2
NC
NC
NC
DVDD_ADC
AVDD_ADC
cost-effective, low-power. It utilizes IEEE 802.15.4 compliant
radios operating in the 2.4GHz unlicensed ISM band. ZigBee
has actualized network layer protocol and IEEE 802.15.4 only 1 36
NC AVDD_RF2
deals with MAC (media access control) layer and PHY, 2
NC AVDD_SW
35
Applications of ZigBee include home and building automation, 3 34
GPIO3 RF_N
4 33
industrial controls and monitoring, energy management and 5
GPIO2
GND
TXRX_SWITCH
32
asset tracking. SRDY 49 RF_P
6 31
MRDY AVDD_RF1
Z-Accel is a solution where TI’s ZigBee stack, Z-Stack, 7
DVDD
CC2480
AVDD_PRE
30
8 29
runs on a ZigBee Processor and the application runs on an 9
GPIO1 AVDD_VCO
28
external microcontroller. The CC2480 handles all the timing GPIO0 VCO_GUARD
10 27
RESET_N AVDD_CHP
critical and processing intensive ZigBee protocol tasks, and 11
CFG0 RBIAS2
26
12 25
leaves the resources of the application microcontroller free to CFG1 AVDD_IF1
AVDD_RREG
AVDD_SOC
XOSC_Q1
R1
SO/RX
SS/CT
SI/TX
43K
A0
A1
1104
hardware and software. The CC2480 functions that are #define MCU430_RDY (P4OUT |= BIT6)
accessible over this interface include the ADC ( void SPI_Init(void);
analog-to-digital converter ), NV memory, GPIO pins, void IO_Init(void);
software timers and the hardware random number bool CC2480_Init(void);
generator. void Delay_us(unsigned int usec)
void Delay_ms(unsigned int msec);
• The Configuration interface: It allows the application void main() {
processor to configure various parameters of the WDTCTL = WDTPW +WDTHOLD;
CC2480 device. IO_Init();
• The Simple API interface: It is a simplified ZigBee CC2480_Init();
interface that can be used to quickly create simple _EINT();//Enable global interrupt
ZigBee compliant networked applications. It allows while(1);//Main loop
for easy device configuration, network formation, {…}
binding and data transfer. }
void SPI_Init() {
• The AF and ZDO interfaces: They feature the UCTL0&=~SWRST;//Reset SWRST
complete ZigBee interface and can be used to create a UCTL0=CHAR+MM+SYNC; //Mode: Master SPI
full range of ZigBee compliant applications. The AF UTCTL0=SSEL1+CKPH; // ACLK,4 line SPI
(Application Framework) interface allows the UBR00=0x4E; // Baud rate
application processor to register its application with UBR10=0x00;
the CC2480 and send and receive data. The ZDO ( UMCTL0=0x00; //bit adjustment
ZigBee Device Objects ) interface provides various ME1=USPIE0; //Enable SPI0
ZigBee management functions like device and service P3SEL|=0x0F;//P3.0~P3.3 is used as SPI mode
discovery. P3DIR=0x0A;//P3.1,P3.3 output mode
It could normally develop CC2480 wireless module if the IE1|=URXIE0;//enable receive interrupt
first three consignations interfaces have correctly achieved. }
There are three procedures to start ZigBee module based on void IO_Init(){
CC2480: P2SEL &= ~BIT6; //P2.6 IO mode
P2DIR &= ~BIT6; //P2.6 input
• CC2480 power-up: Host processor and CC2480 power
P4SEL &= (~BIT0 & ~BIT1 & ~BIT6 & ~BIT7);
up, and host processor sets CC2480 RESET_N pin
P4DIR |= (BIT0 | BIT1 | BIT6 | BIT7);
low, holding CC2480 in reset status, and then sets the
}
optional CC2480 CFG0 and CFG1 pins ( if these pins
bool CC2480_Init(){
are controlled by the host processor ), initializes its
RESET_N_L; //Holding CC2480
UART or SPI interface.
CFG0_1; CFG1_1;
• CC2480 configuration: After the CC2480 power-up, SPI_Init(); //UART initializtion
the host processor should configure it according to its RESET_N_H; //Reset CC2480
application needs. The exact configuration sequence Delay_ms(10);
can vary depending on the cause of the reset and if(CC2480_RDY_L) return true;
which parameters need to be configured on the else return false;
CC2480. }
void Delay_us(unsigned int usec) {
• CC2480 ZigBee stack startup: After configuration of while(usec > 3) {
the CC2480 device, the host processor should register asm("NOP"); // 1 cycles for nop
its application and then start the operation of the asm("NOP"); // 1 cycles for nop
ZigBee stack. Once the ZigBee stack has successfully asm("NOP"); // 1 cycles for nop
started, the CC2480 is part of the ZigBee network. The asm("NOP"); // 1 cycles for nop
host processor may now issue commands to perform asm("NOP"); // 1 cycles for nop
discovery, binding and sending and receiving of asm("NOP"); // 1 cycles for nop
packets. asm("NOP"); // 1 cycles for nop
Based on above conclusions, CC2480 power-up procedure asm("NOP"); // 1 cycles for nop
code is programmed as follow [6]: usec -= 2; // 1 cycles
#define RESET_N_H (P4OUT &= ~BIT7) }
#define RESET_N_L (P4OUT |= BIT7) }
#define CFG0_0 (P4OUT &= ~BIT0) void Delay_ms(unsigned int msec){
#define CFG0_1 (P4OUT |= BIT0) while(msec-- > 0){
#define CFG1_0 (P4OUT &= ~BIT1) Delay_us(1000);
#define CFG1_1 (P4OUT |= BIT1) }
#define CC2480_RDY_H (P2IN & BIT6 == BIT6) }
#define CC2480_RDY_L (P2IN & BIT6 == 0x00)
1105
V. TEST RESULTS [4] Texas Instruments.Inc. (2008, April). CC2480 Interface Specification.
[Online].Available:http://focus.ti.com.cn/cn/lit/er/swra175a/swra175a.p
In sunny weather and open space conditions, the distance df.
how long could a pairs of modules normally work is between [5] Texas Instruments.Inc. (2008, June). CC2480 Developer’s Guide.
80 meters to 120 meters. The wirelessly network could be set [Online].Available:http://focus.ti.com.cn/cn/lit/an/swra176/swra176.pdf.
up within 3 seconds measured by the analysis tools. It [6] Wei Xiaolong. MSP430 MCU interface technology and system design.
consumes about 18~22mA if MCU is in working condition Beijing: BeiHang university publishment.2002.(in Chinese)
and CC2480 is in idle condition; about 2.5μA~3.4μA if MCU
is in LPM3 and CC2480 is in low-power state.
We designed 10 nodes to set up a ZigBee network as show
in Figure 5.
C1
R4 E1
R1
R2
E2
R3
E3
E4 E5
1106