1. Use of MicrochipZigBee protocol stack
(1) Prepare hardware, install source files and development tools
You can purchase the PICDEMZ demo toolkit for the MicrochipZigBee protocol stack in China. You can purchase a set of tool kits to test the ZigBee protocol. In addition, you can also create an experimental board for the PIC microcontroller and wireless transceiver that comply with the MicrochipZigBee protocol stack interface.
You can download the complete Microchip protocol stack source file from the Microchip website (http://www.microchip.com), the source code is released in the form of a Windows Installation File. After the download, run the installation program and install the protocol stack source file according to the steps.
Install the PIC microcontroller integrated development environment MPLABIDE and C compiler MicrochipC18 or Hi-TechPICC-18 compiler.
(2) Compile and demonstrate the application
Use the MPLABIDE integrated development environment to compile the application to ensure that the application is correctly compiled. Analyze the application to understand the functions of each part.
(3) connect to the hardware and download the test program for testing.
The application program needs to use the programmer MPLABICD2 to burn the PICDEMZ motherboard. After the MPLABICD2, PICDEMZ motherboard and computer are correctly connected, power on the PICDEMZ motherboard and start MPLABIDE, integrate the programming function of the development environment to program the PICDEMZ motherboard to download the test program.
After the download, connect the PICDEMZ Wireless RF card to the PICDEMZ motherboard, run the test board with the test program separately, and verify the function of the test program.
(4) detailed analysis of the Protocol Stack
After testing the demo program, you need to analyze the protocol stack in detail to understand the composition structure, functions and implementation methods of the protocol stack.
(5) Develop new applications
The MicrochipZigBee protocol stack only provides two demo programs, but implements a simple ZigBee function demonstration. You need to develop applications based on your application requirements and the functions implemented by the MicrochipZigBee protocol stack.
2. MicrochipZigBee protocol stack porting
The MicrochipZigBee protocol stack imposes restrictions on both software and hardware, but in most cases, users will not use the software and hardware environment for this protocol stack so that it can be applied on other software and hardware platforms, discuss the stack porting steps. Therefore, we need to port the MicrochipZigBee protocol stack. Here we will briefly introduce the ZigBee protocol in other hardware and software environments.
(1)Measure the test taker's knowledge about the similarities and differences between the hardware supported by the custom hardware platform and the MicrochipZigBee protocol stack.
Analyze and compare the custom hardware platform and the hardware platform supported by the MicrochipZigBee protocol stack to understand the distribution of their processors on the I/O port, memory composition and usage, interrupt processing, and stack operations. In addition, the similarities and differences between the ZigBee Wireless Transceiver used by the two should be analyzed to understand their operation sequence, control commands, and functions of various registers.
(2)Detailed analysis of MicrochipZigBee protocol stack
After you have a clear understanding of the hardware, You need to analyze the protocol stack in detail to understand the protocol stack composition, functions, and implementation methods, it also understands what changes are required to the protocol stack for the hardware, what functions are available, what functions are not available, and what functions need to be added.
(3)Modify the MicrochipZigBee protocol stack and use your compiler for compilation.
After completing the preceding steps, you can modify the MicrochipZigBee protocol stack. When modifying the stack, You need to modify some macros and constants based on the features of the compiler. After the modification is complete, you must use the user's compiler to compile it.
(4)Write a test program to test the modified protocol stack.
After the protocol stack is modified, you need to write the corresponding test program to test the modified protocol stack. When writing the test program, you need to test each part of the function of the protocol stack.
(5)Develop applications
After all functions are tested, you can develop applications as needed.
Edit recommendations]