当前位置:网站首页>NRF24L01 wireless module setting transmit receive mode method
NRF24L01 wireless module setting transmit receive mode method
2022-07-22 18:49:00 【Li.Thor】
NRF24L01 The wireless module sets the transmission and acceptance mode
NRF24L01 Wireless module through setting CONFIG The last bit of the register , Realize the setting of transmission and reception modes .
CONFIG The contents of the register :
The specific procedures are as follows :
/ function :void SetRX_Mode(void)
/ function : Data receiving configuration
/**************************************************************************************************/
void SetRX_Mode(void)
{
CE=0;
SPI_RW_Reg(WRITE_REG + CONFIG, 0x0f);
// This sentence will RNF4L01 Set to accept mode
// IRQ Interrupt response after receiving and sending ,16 position CRC , Main reception ;
CE = 1;
inerDelay_us(130);
}
Its SPI_RW_Reg(WRITE_REG + CONFIG, 0x0f); Medium 0x0f namely 0000-1111; At this time, set the last bit to 1, It is the receiving mode ;
The specific procedures are as follows :
/ function :void nRF24L01_TxPacket(unsigned char * tx_buf)
/ function : Data transmission configuration
/***************************************************************************
void nRF24L01_TxPacket(unsigned char * tx_buf)
{
CE=0; //StandBy I Pattern
SPI_Write_Buf(WRITE_REG + RX_ADDR_P0, TX_ADDRESS, TX_ADR_WIDTH); // Load the receiver address
SPI_Write_Buf(WR_TX_PLOAD, tx_buf, TX_PLOAD_WIDTH); // Loading data
SPI_RW_Reg(WRITE_REG + CONFIG, 0x0e); // IRQ Interrupt response after receiving and sending ,16 position CRC, Master send
CE=1; // Set high CE, Trigger data transmission
inerDelay_us(10);
}
Its SPI_RW_Reg(WRITE_REG + CONFIG, 0x0e); in 0x0e namely 0000-1110; Set the last bit to 0; It is the sending mode .
Statement : Summary of notes in study , Welcome to exchange your opinions .
边栏推荐
- PAT乙级1020月饼(注意测点)
- App移动端测试【6】应用程序(apk)包管理与activity
- 项目启动过后,一直循环加载mapper xml文件
- 【STM32】STM32 SDIO SD卡读写测试(二)-- SD_Init之Power On阶段
- PTA习题8-6 删除字符
- Unity: 快速定位摄像机Camera
- 连接mysql8.0出现caching-sha2-password问题
- PAT乙级1010一元多项式求导(题意理解)
- 1.QTableWidget的closable,2.pro/build_pass、member,3.QString&&
- 预算dll要达到的效果,Qt将第三方窗口嵌入程序内,excel操作,数据库外键,判断程序是否启动
猜你喜欢
【SDIO】SD2.0协议分析总结(二)-- SD卡识别&数据传输过程
[STM32] STM32 SDIO SD card read / write test (IV) -- SD_ Transfer mode phase of test
总结20220121
Go 语言重要知识点:字符串、UTF-8 编码、rune
Over the weekend, I had a dinner with the technology gurus and talked about the "golden nine and silver ten" peak of the software testing industry [the trend of involution has been formed]
05. Law of Demeter LOD
C language simple TCP server program
【TOOLS】TortoiseSVN如何设置比较工具为Beyond Compare 4
bjyx
06.里氏替换原则(Liskov Substitution Principle,LSP)
随机推荐
【SDIO】SD2.0协议分析总结(二)-- SD卡识别&数据传输过程
amh多mysql版本共存?
1.qt 查看源码
App mobile terminal test [6] application program (APK) package management and activity
牛人专栏-博客汇总
【Nordic】nRF52810 OTA升级(二)–DFU如何使用
Go 管道模式的实际例子——计算一系列文件的 md5 值
AMH multiple MySQL versions coexist?
LeetCode 105. 从前序与中序遍历序列构造二叉树
Summary 20220120
QT的sprintf重写;qt下内容按界面的缩放而缩放(不改变字体大小)
02.依赖导致原则 - Dependence Inversion Principle
总结20220215(kruskal和prim)
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib64/php/modules/mysqli.so'
PTA基础题 7-23 币值转换 (20 分) (属实恶心)
[STM32] STM32 SDIO SD card read / write test (II) -- SD_ Power on phase of init
[STM32] STM32 SDIO SD card read / write test (I) -- SD card hardware design and software migration
【QT源代码复用】模拟QCompleter的弹窗方式
【FatFs】FAT32文件系统协议总结(理论+实践)
How PHP prevents CSRF attacks