当前位置:网站首页>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/
边栏推荐
- golang Make a list of intervals with sequential numbers
- Recently prepared to translate foreign high-quality articles
- [eosio] eos/wax signature error is_ Canonical (c): signature is not canonical
- Idea auto generator generates constructor get/set methods, etc
- ES6 const constants and array deconstruction
- konva系列教程2:绘制图形
- 使用EAST ocr遇到的坑解决方法(编译lanms)
- String deformation (string case switching and realization)
- CDN加速是什么
- STM32开发板+机智云AIoT+家庭监测控制系统
猜你喜欢
![[eosio] eos/wax signature error is_ Canonical (c): signature is not canonical](/img/d8/a367c26b51d9dbaf53bf4fe2a13917.png)
[eosio] eos/wax signature error is_ Canonical (c): signature is not canonical

22 years of a doctor in Huawei
[email protected]@COLLATION_CONNECTION */"/>.sql数据库导入错误:/*!40101 SET @[email protected]@COLLATION_CONNECTION */

Idea auto generator generates constructor get/set methods, etc

字符串

UE4_UE5結合offline voice recognition插件做語音識別功能

Es7/es9 -- new features and regularities

Several optimization scenarios using like fuzzy retrieval in SQL

ES6 - numerical extension and object extension

Actual combat: how to quickly change font color in typera (blog sharing - perfect) -2022.6.25 (solved)
随机推荐
【ModuleBuilder】GP服务实现SDE中两个图层相交选取
New network security competition of the secondary vocational group in 2022
ES6 - numerical extension and object extension
What aspects should we start with in the feasibility analysis of dry goods?
百度:2022年十大热度攀升专业出炉,第一名无悬念!
OpenJudge NOI 2.1 15:Counterfeit Dollar
电路模块分析练习5(电源)
Day3 data types and operators summary and job
Repoptimizer: it's actually repvgg2
元宇宙标准论坛成立
ES6 -- formal parameter setting initial value, extension operator, iterator, and generating function
Leetcode(605)——种花问题
【opencv450-samples】inpaint 使用区域邻域恢复图像中的选定区域
Comp212 distributed protocol
Determine whether the appointment time has expired
Xampp重启后,MySQL服务就启动不了。
OBS-Studio-27.2.4-Full-Installer-x64.exe 下载
Pycharm student's qualification expires, prompting no suitable licenses associated with account solution
. SQL database import error: / *! 40101 SET @OLD_ COLLATION_ [email protected]@COLLATION_ CONNECTION */
Jupiter notebook common shortcut keys