Document directory
- 1. Install IAR 8051 7.30b
- Ii. Install TI's Zigbee protocol stack
- 3. Install packet sniffer
- 4. Install smartrf flash programmer
- V. Initial Knowledge of the protocol stack directory
- 6. Try the routine under <projects> on your own.
Getting started with ZigBee (1) -- The establishment of a cc2430-based ZigBee Development Environment
Logiclimit
Preface: as you graduate soon, sort out the content of some projects you have previously worked on and share them with you. Please kindly advise and welcome your peers to communicate with each other. I hope the future will take less detours. ZigBee beginner guide originated from the ZigBee network part in the course design wireless ECG Acquisition System in junior year. The ZigBee entry guide is scheduled to be divided into three parts: 1. Establishment of the development environment; 2. Running ZigBee routines; 3. A ZigBee-based master-slave data collection system, the sorting is completed in about one month. The copyright of this article is owned by the original logiclimit. Please indicate the source when reprinting.
ZigBee is a short-range, low-speed wireless network with low power consumption. It uses the free GHz band and is mainly used in wireless sensor networks and smart home. Many companies have released their own ZigBee chips and modules. I am using the ZigBee Module Based on Ti cc2430, produced by wireless dragon corporation, the ZigBee protocol stack version used is TI_ZStack-1.4.3-1.2.1 (corresponding to standard ZigBee 2006 ). This article describes how to establish the development environment. The development environments used are Windows 7 and IAR 8051 7.30b. It should be pointed out that Ti currently focuses on its 8051 module, which uses IAR 7.50 2006 2007 and supports ZigBee 8051 pro and ZigBee 7.50. Since the author does not have the and IAR modules, therefore, we cannot guarantee that the content in this article applies to the development environment and protocol stack of the standard. The operating system used in previous development is Win XP, so the content mentioned in this article is also applicable to Win XP. This article assumes that the reader understands the use of IAR software and cc2430 Single Chip Microcomputer functions, and has certain C language basics and embedded development experience.
Since there was only one semester before, and the related analog collection circuit was also designed, ZigBee only completed the establishment of the network, data transmission and receiving, and control content, a little crude, please do not laugh.
1. Install IAR 8051 7.30b
Run the installer ew8051-ev-730b.exe with the authority of the Administrator. Enter the corresponding registration code as prompted to complete the installation.
Ii. Install TI's Zigbee protocol stack
Download the swrc073d.zip zip package from the Tiguan network, decompress the package, and install it. Unable to complete installation in Windows 7, based on previous experience in WINXP installation, this installer generates a directory named <ZStack-1.4.3-1.2.1>, the directory contains the ZigBee protocol stack and related documents and routines. Therefore, you can complete the installation in the WINXP Virtual Machine and copy it to win7.
3. Install packet sniffer
During ZigBee development, a downloader and a module can be used to form an sniffer. TI'sPacket snifferAfter the software is complete, download swrc045j.zip from ti's website, decompress it, and install it.Packet snifferIt monitors not only ZigBee data packets, but also all IEEE 802.15.4 wireless data packets. Interface 1 of the program
Figure 1
4. Install smartrf flash programmer
Similar to the MAC address of the network card, different ZigBee modules use different IEEE addresses (the practical product must apply for the relevant addresses from the IEEE ).Smartrf flash programmerYou can write programs and IEEE addresses for the ZigBee module to read the programs in the module. Download swrc044f.zip from ti's website, decompress it, and install it. There is alsoIEEE address program softwareCan only read and write the ieeeaddress. In swrc063.zip, ifSmartrf flash programmer, No installation requiredIEEE address program software.Smartrf flash programmerThe program interface 2 is shown in.
Figure 2
V. Initial Knowledge of the protocol stack directory
In the <ZStack-1.4.3-1.2.1> directory structure 3, there are mainly <Components>, <documents>, <projects> and <tools> four directories, <documents> is the relevant development documentation, <tools> there are two development auxiliary tools, zoad and Z-tool. zoad is used for aerial download, and Z-tool can be used to observe the network status and display the output content of serial ports. The hardware driver codes stored in <Components> and <projects> and <components/hal> are the most relevant to users. Based on the actual development board or product, if the pin function configuration of cc2430 is different, you need to modify and add the relevant driver code. <Projects> there are multiple routines used to learn the development of Ti Zigbee. Different program frameworks are provided. You can use related routines as templates to create your own projects.
For hardware driver code for different peripherals, in addition to the timer, AD and other cc2430 internal peripherals do not need to write their own drivers, for buttons, led, LCD should be rewritten according to the actual connection. Generally, different manufacturers adopt the design of core modules and Expansion Boards. The differences between different manufacturers are that the Expansion Boards are different. TI's original Expansion Boards are also divided into DB and EB. Various manufacturers will provide some reference for Ti's Development Board during design. For the wireless Dragon Development Board I use, it is the most similar to TI's cc2430eb, the subsequent routines are modified EB board routines.
For the documents in <documents> (including the <cc2430> directory ), beginners should have at least read the following articles Z-stack developer's guide _ F8W-2006-0022 _, Z-stack sample applications (F8W-2006-0023) "," Hal driver api _ F8W-2005-1504 _ "," Z-stack sample application for CC2430DB_F8W-2007-0017 _ "," create new application for the CC2430DB_F8W-2005-0033 _ ".
Figure 3
6. Try the routine under <projects> on your own.
Although one of the purposes of this tutorial is to allow later users to take less detours, the learning spirit of personal active exploration is also essential. It is recommended that you search for the principle diagram of Ti and wireless Dragon Development Board on the Internet, similar to others (in fact, I initially had only three modules and made an expansion Board ). Download the routine under <projects> to see if it can run.