Basics of ZigBee™ 1. What is ZigBee? 2. How ZigBee came into existence? 3. Where ZigBee can be used? 4. What can ZigBee network contain? 5. What are the features of ZigBee? 6. What are the layers in ZigBee? 7. What are the device types in the ZigBee network? 8. What are the frame structures supported by ZigBee? 9. What are advantage of cluster / mesh network over star networks? 10. What is CSMA – CA Technology? 11. What is CSMA – CD Technology? Basics of Microchip ZigBee 1. What does Microchip offer for ZigBee? 2. Is the Microchip ZigBee Stack fully ZigBee Protocol Compliant? 3. Does the stack support both 8 and 16 bit Microchip architectures? 4. What application profiles does the Microchip stack support? 5. What are memory requirements of the Microchip ZigBee stack? 6. What are the frame structures supported by Microchip ZigBee Stack? 7. Which are the transceivers supported by the Microchip ZigBee Stack? 8. How will the parent node respond to the child node if it goes out of the vicinity and then again comes back, in a ZigBee network? 9. Can an RFD node have more than one Coordinator in a ZigBee network? 10. How do I change the MAC address if I am using multiple RFDs in my ZigBee Network? 11. Can Heap allocated space on the RAM (data memory) be transferred on to the Flash in ZigBee Stack? 12. What is the effect of reducing heap size for the over all performance ZigBee stack? 13. Does heap size reduction require re-certification of ZigBee Stack? 14. As ZigBee network supports 65536 devices. With the current stack will it support all 65536 devices? 15. With the addition of each extra RFD, what is the memory (RAM and Flash / EEPROM) requirement on the PAN Coordinator and Coordinator side? 16. What is the most important thing the customers can take advantage of from Microchip ZigBee Stack? 17. What are the basic requirements for a PIC MCU in a ZigBee application? Basics of ZigBee 1. What is ZigBee? ZigBee is a standard for embedded application software and has been ratified in late 2004 under IEEE 802.15.4 Wireless Networking Standards. ZigBee is an established set of specifications for wireless personal area networking (WPAN), i.e., lighting control among related devices. This kind of network eliminates use of physical data buses like USB and Ethernet cables. The devices could include telephones, hand-held digital assistants, sensors and controls located within a few meters of each other. ZigBee is one of the global standards of communication protocol formulated by the relevant task force under the IEEE 802.15 working group 2. How ZigBee came into existence? The ZigBee Alliance has been set up as “an association of companies working together to enable reliable, cost-effective, low-power, wirelessly networked, monitoring and control products based on an open global standard”. For the first time, companies will have a standards-based wireless platform optimized for the unique needs of remote monitoring and control applications, including simplicity, reliability, low-cost and low-power”. 3. Where ZigBee can be used? The goal is “to provide the consumer with ultimate flexibility, mobility, and ease of use by building wireless intelligence and capabilities into every day devices. ZigBee technology will be embedded in a wide range of products and applications across consumer, commercial, industrial and government markets worldwide. Presently this includes broadly the Home Automation, Building Automation, Consumer Electronics, Personal Health Care and Industrial Automation categories. Some of the direct applications are: Security HVAC Lighting Control Access Control PC & Peripherals Remote controls for TV/DVD 4. What can ZigBee network contain? The target networks encompass a wide range of devices with low data rates in the Industrial, Scientific and Medical (ISM) radio bands, with building-automation controls like intruder/fire alarms, thermostats and remote (wireless) switches, video/audio remote controls likely to be the most popular applications. So far sensor and control devices have been marketed as proprietary items for want of a standard. With acceptance and implementation of ZigBee, interoperability will be enabled in multi-purpose, self-organizing mesh networks. 5. What are the features of ZigBee? 1. Has low power consumption with battery life ranging from months to years. (Operates in discontinuous Tx/Rx mode or sleep mode) 2. Maximum data rates allowed for each of these frequency bands are fixed as 250 kbps @2.4 GHz, 40 kbps @ 915 MHz, and 20 kbps @868 MHz. 3. High throughput and low latency for low duty-cycle applications (<0.1%) 4. Channel access using Carrier Sense Multiple Access with Collision Avoidance (CSMA-CA) 5. Addressing space of up to 64-bit IEEE address devices, 65,535 nodes per network and support typical range of 50 M. 6. Fully reliable “hand-shake” data transfer protocol. 7. Supports network topologies like star, peer-to-peer, mesh and cluster tree 6. What are the layers in ZigBee? The ZigBee Standard has evolved standardized sets of solutions, called ‘layers'. These layers facilitate the features that make ZigBee very attractive: low cost, easy implementation, reliable data transfer, short-range operations, very low power consumption and adequate security features. The layers are Application Support layer Network Layer Media access control (MAC) layer Physical (PHY) layer For more details please refer the application note AN965 (Microchip Stack for the ZigBee Protocol) from the link http://www.microchip.com/stellent/idcplg?IdcService=SS_GET_PAGE&nodeId=1 824&appnote=en021878 7. What are the device types in the ZigBee network? There are three different ZigBee device types that operate in any self-organizing application network. Coordinator Router End Device( either full function FFD or reduced function RFD devices) For more details please refer the application note AN965 (Microchip Stack for the ZigBee Protocol) from the link http://www.microchip.com/stellent/idcplg?IdcService=SS_GET_PAGE&nodeId=1 824&appnote=en021878 8. What are the frame structures supported by ZigBee? The four frame structures are : Beacon frame for transmission of beacons Data frame for all data transfers Acknowledgement frame for successful frame receipt confirmations MAC command frame 9. What are advantage of cluster / mesh network over star networks? The cluster and mesh network are also known as a multi-hop network, due to their abilities to route packets between multiple networks, while the star network is called a single-hop network. The mesh network allows the designer the extended the physical range of the network, and to provide adequate redundancy. 10. What is CSMA – CA Technology? CSMA – CA is Carrier sense multiple access collision avoidance, CSMA/CA is a modification of pure CSMA. Collision avoidance is used to improve the performance of CSMA by attempting to be less "greedy" on the channel. If the channel is sensed busy before transmission then the transmission is deferred for a "random" backl-off interval. This reduces the probability of collisions on the channel. 11. What is CSMA – CD Technology? CSMA – CD is Carrier sense multiple access collision detection, is a network control protocol in which a carrier sensing scheme is used. a transmitting data station that detects another signal while transmitting a frame, stops transmitting that frame, transmits a jam signal, and then waits for a random time interval (known as "backoff delay" and determined using the truncated binary exponential backoff algorithm) before trying to send that frame again. Collision detection is used to improve CSMA performance by terminating transmission as soon as a collision is detected, and reducing the probability of a second collision on retry, also methods for collision detection are media dependent. Basics of Microchip ZigBee 1. What does Microchip offer for ZigBee? Microchip offers the following to support ZigBee : Zero-cost-license and royalty-free ZigBee protocol stack Source-code format, allowing designers to customize their products ZigBee compliant transceiver called MRF24J40 (MRF24J40 is a 2.4 GHz IEEE 802.15.4 transceiver targeted for the ZigBee protocol) ZigBee compliant transceiver module called MRF24J40MA (MRF24J40MA is an agency certified transceiver module based on the MRF24J40) Hardware support tools include PICDEM Z MRF24J40 2.4 GHz Daughter Card PICDEM Z 2.4 GHz DEMO KIT ZENA (ZigBee) NETWORK ANALYZER 2. Is the Microchip ZigBee Stack fully ZigBee Protocol Compliant? Version 1.0-3.8 of the Microchip Stack for the ZigBee Protocol provides all the required features of the v1.0 ZigBee protocol specification (except those limitations listed below) with a simple interface in a minimum amount of program memory. This version has passed ZigBee Compliant Platform (ZCP) certification 1.0 from ZigBee Alliance and is certified to be able to work with other certified ZigBee devices. Note - Limitations from the ZigBee Protocol and IEEE 802.15.4 Specifications 1. Only security residential mode is supported. 2. Only non-beacon networks are supported. This is an IEEE 802.15.4 limitation only. Currently, ZigBee specifies only non-beacon networks. For more details and update on please refer the Microchip ZigBee Stack from the link http://www.microchip.com/stellent/idcplg?IdcService=SS_GET_PAGE&nodeId=1 824&appnote=en021878 3. Does the stack support both 8 and 16 bit Microchip architectures? Microchip has developed two different stacks supporting 8 and 16 bit Microchip architectures 8 bit - PIC18F/PIC18FxxJ architectures - AN965 Stack v1.0-3.8 for PIC18 16 bit - PIC24H/PIC33F architectures - AN965 Stack v1.0-3.8.1 for PIC24 and dsPIC33 . However the 16-bit stack is not ZigBee certified. For more details please refer the link http://www.microchip.com/stellent/idcplg?IdcService=SS_GET_PAGE&nodeId=1 824&appnote=en021878 4. What application profiles does the Microchip stack support? Currently Microchip supports the Home Control Lighting Profile along with the ZigBee stack. 5. What are memory requirements of the Microchip ZigBee stack? Approximate program memory requirements for the Microchip ZigBee stack (Ver 3.80) are as follows. These numbers include Minimum binding and neighbor table size as specified by the Stack Profile. All optimizations enabled. Procedural-abstraction passes to set to 4. All start-up code, initialization, interrupt vectors, and required libraries are included. Following stack size is for PIC18LF4620 microcontroller. Stack size for other PIC18 family (8-bit) microcontrollers may have small differences. Without Security (KB) With Security (KB) Coordinator 39.7 46.1 Router 32.9 39.3 End Device (RFD) 20.9 26.4 Following stack size is for dsPIC33FJ256GP710 microcontroller. Stack size for other 16-bit microcontrollers may have small differences. Without Security (KB) With Security (KB) Coordinator 38.9 44.0 Router 32.1 36.9 End Device (RFD) 22.3 26.2 RAM requirements are highly dependent on the application configuration. A simple RFD will require at least 5 banks of available RAM. Coordinators and Routers can require a great deal more, especially if they have RFD children. Refer to the latest AN965 for more information. For more details and update on please refer the Microchip ZigBee Stack from the link, http://www.microchip.com/stellent/idcplg?IdcService=SS_GET_PAGE&nodeId=1 824&appnote=en021878 6. What are the frame structures supported by Microchip ZigBee Stack? Microchip stack supports all the four ZigBee frames. 7. Which are the transceivers supported by the Microchip ZigBee Stack? Version 1.0-3.8 of the Microchip Stack for the ZigBee Protocol supports Microchip MRF24J40 and UBEC UZ2400. For more details on device update on please refer the Microchip ZigBee Stack readme file from the link http://www.microchip.com/stellent/idcplg?IdcService=SS_GET_PAGE&nodeId=1 824&appnote=en021878 8. How will the parent node respond to the child node if it goes out of the vicinity and then again comes back, in a ZigBee network? Once the child note gets out of the vicinity / switches off from of the parent node, the parent node will not have any information of the child node. However it is the duty of the child node to scan through again once it switches on / gets into the vicinity of the same parent node or a different parent node. 9. Can an RFD node have more than one Coordinator in a ZigBee network? The RFD nodes can communicate or register itself with only one coordinator at a time, which becomes its parent node. If the RFD leaves the its current parent, it can register itself with another parent node. 10. How do I change the MAC address if I am using multiple RFDs in my ZigBee Netwrok? There are two ways of changing the MAC address, From the program, each RFD is compiled with a ZigBee.def file. The file contains the following below MAC address which is 64-bit and later converted to a short address of 16-bit. RFD 1 // Device MAC Address #define MAC_LONG_ADDR_BYTE7 0x00 #define MAC_LONG_ADDR_BYTE6 0x04 #define MAC_LONG_ADDR_BYTE5 0xA3 #define MAC_LONG_ADDR_BYTE4 0x00 #define MAC_LONG_ADDR_BYTE3 0x00 #define MAC_LONG_ADDR_BYTE2 0x00 #define MAC_LONG_ADDR_BYTE1 0x00 #define MAC_LONG_ADDR_BYTE0 0x67 Similarly we need to change for RDF 2 also RFD2 // Device MAC Address #define MAC_LONG_ADDR_BYTE7 0x00 #define MAC_LONG_ADDR_BYTE6 0x04 #define MAC_LONG_ADDR_BYTE5 0xA3 #define MAC_LONG_ADDR_BYTE4 0x0 #define MAC_LONG_ADDR_BYTE3 0x0 #define MAC_LONG_ADDR_BYTE2 0x0 #define MAC_LONG_ADDR_BYTE1 0x0 #define MAC_LONG_ADDR_BYTE0 0x68 etc. for different RFD files. Through the ZENA Analyzer, if you are using ZENA Analyzer then you can change the MAC address as follows: 1. Open ZENA Analyzer (Software on PC) 2. Specify you required MAC address as #define MAC_LONG_ADDR_BYTE7 0x00 Common for all RFDs (as from Vendor ID) #define MAC_LONG_ADDR_BYTE6 0x04 Common for all RFDs (as from Vendor ID) #define MAC_LONG_ADDR_BYTE5 0xA3 Common for all RFDs (as from Vendor ID) #define MAC_LONG_ADDR_BYTE4 0x00 #define MAC_LONG_ADDR_BYTE3 0x00 #define MAC_LONG_ADDR_BYTE2 0x00 #define MAC_LONG_ADDR_BYTE1 0x00 #define MAC_LONG_ADDR_BYTE0 0x68 Byte address changed as required 3. Specify no. of End Points 4. Generate Files That software will create the MyZigBee.c, ZigBee.def, Zlink.lkr files for you. 11. Can Heap allocated space on the RAM (data memory) be transferred on to the Flash in ZigBee Stack? The PIC18 has 64-byte sectors for the Flash, which needs to copied, changed and then re-written each time there is an update of data. The Heap and stack are the most dynamic portions of memory and moving them to flash is not practical, you would automatically incur a 2-ms sector write overhead for EVERY FUNCTION CALL. This might reduce the throughput of the system drastically and hence not recommended at all. The Stack and Heap ought to reside in RAM. 12. What is the effect of reducing heap size for the over all performance ZigBee stack? Heap size is reserved for dynamic memory allocation in the stack. Reduced heap size may reduce the performance and may reject packets in the heavily loaded system especially for Coordinator. 1K heap would be enough for some small demo i.e. LIGHT – SWITCH demo, it depends on the application and how much data to send. 13. Does heap size reduction require re-certification of ZigBee Stack? Changing heap size will not require recertification. 14. As ZigBee network supports 65536 devices. With the current stack will it support all 65536 devices? Yes. The data that supports devices being added to the network are not stored on the stack, so there is not a direct relationship between the number of the devices on the network and the stack size. But as a practical matter, the PIC18 will not support 64K devices, because with that many devices on the network, the routing table, neighbor table etc, would not fit on the 64K PIC part. 15. With the addition of each extra RFD, what is the memory (RAM and Flash / EEPROM) requirement on the PAN Coordinator and Coordinator side? When the network is formed by a Coordinator, the MCHP ZigBee stack is configured to specify the maximum number of End Devices, Routers and max depth of the network. These parameters are used to set the upper limited how many devices can be supported. Hence this is purely dependent on the network topology. Say for example if you consider Mesh routing. Based on the structures like in currentNeighborTableInfo and neighborTableInfo in the coordinator any additional neighboring device added in the network will increase the memory size by around 25-32 bytes. 16. What is the most important thing the customers can take advantage of from Microchip ZigBee Stack? The most important thing is that the Stack is certified. With certification comes the stamp of approval that the mandatory features are all in place. Also MCHP ZigBee stack is one of the smallest code-size wise because we give the customer the option of customizing it for their specific application and device type (Coordinator, Router and End Devices are built separately – not a single library). The size of the neighbor table, binding table etc can be customized etc. Most of our customers are evaluating ZigBee as a part of their overall RF solution. 17. What are the basic requirements for a PIC MCU in a ZigBee application? The Microchip ZigBee protocol stack runs on PIC18 devices. The basic operating requirements for the PIC MCU are sufficient memory space for the ZigBee stack and application code, SPI interface, and Enhanced Flash program memory. The Enhanced Flash self-write capability of PIC18 MCUs is used at run time in the ZigBee stack to configure the network and recognize and bind new network members. The Reduced Function Device (RFD) protocol stack requires approximately 10K bytes Flash program memory. This size is based on our v0.9 specification implementation. The ZigBee stack will be updated to the v1.0 specification. Any of Microchip’s PIC18 Enhanced Flash MCUs with greater than 16K bytes Flash program memory can support the stack. The final device decision is dependent on the type of ZigBee node and the application code size. Microchip offers over 30 PIC18 Enhanced Microcontrollers with 28 to 80 pins and 32 K bytes to 128 K bytes Flash program memory. The RF transceivers are 3.3V devices so a PIC18LF, wide voltage, MCU enables a single supply design. A PIC MCU can be used at 5V for additional performance or features. However, a 3V supply will be required for the RF transceiver as well as level translation for the PIC18F to RF transceiver interface.
© Copyright 2026 Paperzz