当前位置:网站首页>CTS RTS RX TX in serial port flow control UART (direct communication between serial port module and MCU)
CTS RTS RX TX in serial port flow control UART (direct communication between serial port module and MCU)
2022-06-25 23:27:00 【Guistar~~】
Serial port flow control , As the name suggests, it means flow control . The purpose is to coordinate the sending and receiving parties , So that data is not lost .
One . Hardware introduction :
This picture is MCU And serial port module communication hardware , Where the arrow direction asks the output direction

Two . Pin Introduction
RTS:(Request To Send Request to send )
Modular RTS It's for mcu Say you're ready , Low level , If the module is not ready ,MCU Send data to the module , You may lose your bag
CTS:(Clear To Send Clear send , Allow to send )
Modular cts Must be external mcu To low level , Module can send data ,
RXD: (Receive Data receive data )
receive data
TXD:( Transmit Data send data )
send data
3、 ... and . give an example
With xinchida technology ND04(C)NRF52832/10 Module as an example
hardware component :
Only... Is used for transparent transmission GND、VCC、RTS、TX、CTS、RX These six Pin foot , Module and MCU Connect 
MCU Programming reference
Programming ideas
- Module and MCU The serial port between is controlled by hardware flow CTS、RTS Two IO Port to send and receive notification and control .
- these two items. IO Normal high , Set low to trigger .
- When the module can receive data , The module will be set to lower the local RTS(MCU by CTS) Signal to MCU Can send data .
- When MCU When data can be received ,MCU To lower its RTS( The module is CTS) The signal notification module can send data
Reference code ( Provide ideas )
void main(void){
// wait for BLE Module started successfully , Xinchida module ND04X, Print from the serial port of the computer DEVICE_START
while(!memcmp(rx_ble_mode_data(),"DEVICE_START\r\n",strlen("DEVICE_START\r\n")));
// Can make RTS, namely MCU Acceptable BLE Data sent by the module
set_rts_enable();
while(1){
// obtain CTS Whether the status changes to low level
if(get_cts_state()==0){
// Send test data to BLE modular
mcu_send_to_ble_string("Testdata.\r\n");
}
// Handle MCU Acquired data
mcu_data_process(mcu_uart_read_data());
}
}
The knowledge card is over ~ Serial port flow control RTS CTS RX TX I don't understand ?
If you need Bluetooth (BLE) module
Xinchida technology 【Vivi】
contact number :13510534054 ( WeChat )/17806715121
Here is our company NORIDC Series Bluetooth modules include :NRF52832 52810 etc.

More information plus v Or the official website :
https://www.szrfstar.com/
边栏推荐
- Es6-- set
- Idea common plug-ins
- Core points of assembly language
- Some points to pay attention to when closing mongodb services (as well as related commands when opening)
- Determine whether the appointment time has expired
- 建立自己的网站(15)
- 1281_ FreeRTOS_ Implementation analysis of vtaskdelayuntil
- konva系列教程2:绘制图形
- Comp2913 database
- #23class介绍
猜你喜欢

电路模块分析练习6(开关)

Utilisation de la classe Ping d'Unity

STM32开发板+机智云AIoT+家庭监测控制系统
[email protected]@COLLATION_ CONNECTION */"/>. SQL database import error: / *! 40101 SET @OLD_ COLLATION_ [email protected]@COLLATION_ CONNECTION */

为什么OpenCV计算的帧率是错误的?

【AXI】解读AXI协议原子化访问

做接口测试,这3种工具到底什么时候用?

Set up your own website (15)

ACM. HJ16 购物单 ●●

字符串变形(字符串大小写切换和变现)
随机推荐
Es6-- set
作为一个程序员我们如何快乐的学习成长进步呢?(个人感悟和技术无关)
Transformers load pre training model
Unity的Ping类使用
Jupiter notebook common shortcut keys
How to use JMeter for interface testing
【无标题】打开一个项目连接,无法正常显示时,ping一下ip
Windows安装Redis及简单使用
汇编语言核心要点
OBS-Studio-27.2.4-Full-Installer-x64.exe 下载
Several optimization scenarios using like fuzzy retrieval in SQL
NLP pre training model-2018:bert dictionary
如何用jmeter做接口测试
The new version of Tencent's "peace elite" is coming: add a new account security protection system, and upgrade the detection of in-game violations
To solve the incompatibility between VM and device/credential guard, an effective solution for the whole network
NLP text summary: use the pre training model to perform text summary tasks [transformers:pipeline, T5, Bart, Pegasus]
New network security competition of the secondary vocational group in 2022
String deformation (string case switching and realization)
Typora writing DOS commands
My C language learning process