当前位置:网站首页>ZigBee integrated development environment IAR installation
ZigBee integrated development environment IAR installation
2022-07-23 18:58:00 【Full stack programmer webmaster】
Hello everyone , I meet you again , I'm your friend, Quan Jun .
One 、Zigbee summary
1. What is? Zigbee
ZigBee It's a kind of close 、 Low complexity bidirectional wireless communication system , Mainly used for short distance 、 Low power consumption 、 Data transmission between electronic devices with low transmission rate , And it has low power consumption 、 Low cost 、 The large capacity 、 Time is short 、 High reliability and flexible network topology .
Zigbee In essence, it is a way of communication between wireless devices , It is similar to people communicating in Mandarin , Mandarin is a way of communication .Zigbee,Zigbee communication mode ,Zigbee The agreement says the same thing .
Zigbee Its main function is to build wireless LAN .
2. Comparison of various communication modes
bluetooth : Low power consumption , The number of network nodes is small (7~8 individual )
WIFI: The communication rate is relatively high , High power consumption , wait
Zigbee: advantage : Large scale networks can be built , Low power consumption (TI cc2530 Normal working current 8mA, The minimum working current is only a few uA) shortcoming : The communication rate is relatively small ( 250KBPS)
Be careful :Zigbee Just complete the work of data communication , To realize the specific functional system , Usually the Zigbee The module is connected to the computer ( processor ), The computer monitors the whole system by programming .
3. Relevant concepts
Zigbee union : To develop Zigbee The association organization of the agreement ( The United States )
TI( TI ): One Zigbee Chip manufacturer , Mainly Zigbee The protocol is used for promotion and practical application . except TI, also ember, Freescale, wait
Zstack:TI The company to launch Zigbee Protocol stack supported on software . The essence is a pile of sample code .
cc2530:TI Support launched by the company Zigbee A chip of the underlying protocol (8051 MCU core )
cc2530F256 TI 58J
IAR: Write Zigbee A software of the program , Integrated development tools , Editor , compiler , Downloader , Emulator .
4.Zigbee Network architecture
ZigBee The basis of the agreement is IEEE 802.15.4,ZigBee The league is IEEE 802.15.4 On this basis, the network layer and application layer are redefined .Zigbee Use the global free frequency band for communication , It can communicate on three different frequency bands . The global frequency band is 2.400GHz-2.484GHz, The frequency band used in Europe is 868.0 MHz-868.66MHz, The frequency band adopted by the United States is 902MHz-928MHz. The transmission rates are 250kbps 20kbps and 40kbps.
Two 、IAR Installation and use of software
1.IAR Software installation and registration
2.IAR Project establishment
(1) First create a workspace
File–>new–>workspace
(2) Create a project
Project–>Create New Project–>Empty project–>0K–> Save to the specified directory
(3) Create a new file –> Save as .c file
(4) hold .c Add files to the project
Right click ” project name -Debug”–>Add
(5) compile : Save the workspace to the created project folder
3. Options configuration
“ project name -Debug”–>options
(1)General Options–>Device choice Texas Instruments cc2530F256
(2)Linker–>Output–>Override default On the hook ,Allow C-SPY-specific extra output file On the hook
(3)Debugger–>Driver–> choice Texas Instrments
3、 ... and 、 Drive installation
In the device manager , The driver not installed shows SmartRF04EB, After installing the drive , It shows CC2430DB
Hash value error solution 1.Windows key + R, Input shutdown.exe /r /o /f /t 00 , The system will restart a “ Select an option ” 2 from “ Select an option ” On the screen , choice “ Troubleshooting ” , Select from “ Troubleshooting ” The screen “ Advanced options ” , Select from “ Advanced options ” The screen “Windows Startup settings ” , Click on “ Restart ” Button , The system will restart , With “ Advanced startup options ” The screen ; restart 3. This will jump out of the safe mode list after restarting 4. Choose the penultimate , Disable mandatory driver signing , Press the corresponding number . 5. restart , The driver can be successfully installed according to the general method
[ Failed to transfer the external chain picture , The origin station may have anti-theft chain mechanism , It is suggested to save the pictures and upload them directly (img-8BvBttrd-1621863122867)(https://i.loli.net/2021/05/24/B8pGcTQFZU3jb5N.jpg)]
Four 、 Compilation and simulation
5、 ... and 、 Generate Hex File settings
“ project name -Debug”–>options ,Linker–>Extra Output–>Genetare extra outputfile On the hook ,Override defualt On the hook –> Name it .hex file ,output format :intel-extended–>OK
After compiling again, it will be in Debug/Exe Generate... In directory .hex file
6、 ... and 、ZigBee Core controller
Wireless communication adopts Ti Zigbee programme .Zigbee Node adoption Ti( TI ) company CC2530,GEC-CC2530 Yes 21 Number of inputs / Output pin , It can be configured as a general digital I/O Or peripherals I/O The signal , peripherals I/O Can be connected to ADC、 Timer or USART etc. .
among 21 individual I/O The pins are divided into 3 Ports ( port 0、 port 1 And port 2, Expressed as P0、P1 and P2), among ,P0 and P1 Each group has 8 individual IO Pin , and P2 Group only 5 The physical objects of pins are shown in the figure .
7、 ... and 、 Code burning test
LED flashing
#include "iocc2530.h"
typedef unsigned char uchar;
typedef unsigned int uint;
#define LED0 P1_0 // Definition P1.0 The mouth is LED0 Control terminal
#define LED1 P1_1 // Definition P1.0 The mouth is LED1 Control terminal
// Light up two LED The lamp
void led_init(void)
{
P1DIR |= 0x03;
LED0 = 0;
LED1 = 0;
}
void delay_ms(uint msec)
{
uint i,j;
for (i=0; i<msec; i++)
for (j=0; j<535; j++);
}
void main(void)
{
led_init();
while(1)
{
LED1 = 0;
LED0 = 0;
delay_ms(500);
LED1 = 1;
LED0 = 1;
delay_ms(500);
}
}Publisher : Full stack programmer stack length , Reprint please indicate the source :https://javaforall.cn/126705.html Link to the original text :https://javaforall.cn
边栏推荐
- ros(27):rosparam简单使用与一种通过launch传递参数不成功与解决
- C#Split的用法,Split分割字符串
- 【2020】【论文笔记】相变材料与超表面——
- 【游戏建模模型制作全流程】用ZBrush制作游戏士兵角色
- 电子元件-电阻
- Google is improving the skin color performance in all products and practicing the concept of "image fairness"
- 80 + guests took the stage, users from more than 10 countries attended the meeting, and 70000 + viewers watched the end of "Gwei 2022 Singapore"
- 元胞数组处理
- Database modeling
- Time2Vec 的理解与简单实现
猜你喜欢

OSI模型第一层:物理层,基石般的存在!

Rhcsa notes 7
![[2013] [paper notes] terahertz band nano particle surface enhanced Raman——](/img/09/af80a744573ce53a0056e7124675a8.png)
[2013] [paper notes] terahertz band nano particle surface enhanced Raman——

What is the current situation of the next generation industry? 90% of career changing modelers are learning this process

Have a safe summer vacation, no holidays! Please keep these summer safety tips

What problems do you usually encounter when learning 3D modeling? It's too much

Is learning next generation modeling a good scene or a good role? Choose the right profession and pay more than half

Paddlenlp之UIE分类模型【以情感倾向分析新闻分类为例】含智能标注方案)

基于 softether 搭建虚拟私有网络
![Redis [2022 latest interview question]](/img/32/7efbc52f97eb3be90c7fa2e6863758.png)
Redis [2022 latest interview question]
随机推荐
LeetCode 0131. 分割回文串
BOM introduction of BOM series
? The problem of front desk parameter transmission needs to be confirmed
自学3D建模能不能成功?自学能就业吗?
Navigation component of jetpack compose uses
【2020】【论文笔记】基于Rydberg原子的——
As a senior 3D modeler, I give some suggestions to novice learning partners to use
FPGA实现IIC协议(二)之IIC总线的FPGA实现(单次读写驱动)
[whole process of game modeling model production] ZBrush weapon model production: Crossbow
C#启动程序传递参数丢失双引号,如何解决?
Great God "magic change" airpods, equipped with usb-c interface, 3D printing shell makes maintenance easier
[onnx] the problem of dynamic input size (multi output / multi input)
Learn about spark project on nebulagraph
Flutter operation mode
[2020] [paper notes] phase change materials and Hypersurfaces——
Database modeling
VS2010一个解决方案下新建多个项目出现的问题和方法
Three things programmers want to do most | comics
Handwriting bind, call, apply is actually very simple
How to become a modeler? Which is more popular, industrial modeling or game modeling?