山东大学学报 (工学版) ›› 2020, Vol. 50 ›› Issue (3): 24-30.doi: 10.6040/j.issn.1672-3961.0.2019.705
摘要:
针对目前不同物联网设备之间多机通讯模块繁多、设备结构复杂、成本高的问题,提出一种基于通用异步收发传输器(universal asynchronous receiver/transmitter,UART)串口的多机通讯方法。基于微控制器自带的UART串口通讯方式,利用控制线控制通讯设备对通信线路的占用,采用主从控制策略,设定通讯协议和通讯主机、从机,主机作为信息转发和识别的单元,从机组成信息处理的单元,并通过通讯协议实现多从机扩展的功能。通过移植μC/OS-Ⅱ操作系统到STM32微控制器上,借助μC/OS-Ⅱ的实时多任务特性,将信息的接收、发送和识别设计成不同优先级的任务。试验结果表明,多机分时通讯方法能够实现主机、从机的信息接收、发送、识别的功能和多机可靠稳定的通讯,解决传统UART方式无法实现多机互相通讯的问题,为物联网设备的多机通讯提供一种可行方案。
中图分类号:
1 | 徐翀, 杨锐涛, 成正涛. 物联网环境下的智能家居发射控制系统的设计[J]. 科技风, 2019, (30): 103. |
XU Chong , YANG Ruitao , CHENG Zhengtao . Design of smart home launch control system in internet of things environment[J]. Technology Wind, 2019, (30): 103. | |
2 | ALOZIE A , WESTPHAL B , KISCHE S . Surgical revision after percutaneous mitral valve repair by edge-to-edge device: when the strategy fails in the highest risk surgical population[J]. European Journal of Cardio Thoracic Surgery, 2014, 46 (1): 55- 60. |
3 | GHANBARI Z , JAFARI N N , HOSSEINZADEH M , et al. Resource allocation mechanisms and approaches on the internet of things[J]. Cluster Computing, 2019, (22): 102- 106. |
4 | ALVI S A, SHAH G A, MAHMOOD W. Energy efficient green routing protocol for internet of multimedia things[C]//2015 IEEE Tenth International Conference on Intelligent Sensors, Sensor Networks and Information Processing (ISSNIP). Singapore: IEEE, 2015: 426. |
5 | 赵红焱. 基于Delphi的实验室设备通讯实现[J]. 涟钢科技与管理, 2019, (5): 60- 62. |
ZHAO Hongyan . Delphi-based laboratory equipment communication implementation[J]. Lian Steel Technology and Management, 2019, (5): 60- 62. | |
6 | 王广斌. 基于串口的OPC通讯技术在油库的应用[J]. 石油库与加油站, 2019, 28 (4): 25- 28. |
WANG Guangbin . Application of OPC communication technology based on serial port in oil depot[J]. Oil Depot and Gas Station, 2019, 28 (4): 25- 28. | |
7 | 赵健, 张鑫褆, 李佳明, 等. 群体智能2.0研究综述[J]. 计算机工程, 2019, 45 (12): 1- 7. |
ZHAO Jian , ZHANG Xinti , LI Jiaming , et al. Research review of crowd intelligence 2.0[J]. Computer Engineering, 2019, 45 (12): 1- 7. | |
8 | 孙文磊, 张学东, 熊宗慧, 等. 智能制造及其关键技术[J]. 新疆大学学报(自然科学版), 2019, 36 (4): 379- 386. |
SUN Wenlei , ZHANG Xuedong , XIONG Zonghui , et al. Intelligent manufacturing and its key technologies[J]. Journal of Xinjiang University (Natural Science Edition), 2019, 36 (4): 379- 386. | |
9 | SHINICHI Fujimoto , HIROSHI Inai , JIRO Yamakita . Performance evaluation of packet reassembly at an edge device in ATM-LANS[J]. Electronics & Communications in Japan, 2001, 84 (1): 40- 48. |
10 | 蒋元中, 金浪滨, 汤杭森, 等. 基于串口通讯的闸站监控数据共享方案的设计与实现[J]. 浙江水利科技, 2019, 47 (1): 62- 63. |
JIANG Yuanzhong , JIN Langbin , TANG Hangsen , et al. Design and implementation of monitoring data sharing scheme based on serial port communication[J]. Zhejiang Hydrotechnics, 2019, 47 (1): 62- 63. | |
11 | 林宏翔, 罗中良, 魏晓慧, 等. 基于串口通讯的程控射频开关控制器设计[J]. 日用电器, 2018, (10): 94- 98. |
LIN Hongxiang , LUO Zhongliang , WEI Xiaohui , et al. Design of remote RF switch controller based on serial communication[J]. Electrical Appliances, 2018, (10): 94- 98. | |
12 | 张兴宇, 韩策, 曹雷天, 等. 基于串口触摸屏在机电控制系统中的应用[J]. 科技经济导刊, 2018, 26 (18): 46. |
ZHANG Xingyu , HAN Ce , CAO Leitian , et al. Application of touch screen based on serial port in electromechanical control system[J]. Technology and Economic Guide, 2018, 26 (18): 46. | |
13 | 路染妮. 探究单片机的多串口扩展技术的设计[J]. 自动化与仪器仪表, 2018, (9): 137- 140. |
LU Ranni . The design of multi serial port expansion technology[J]. Automation and Instrumentation, 2018, (9): 137- 140. | |
14 | 邵金菊, 曲金玉, 高松, 等. 基于RS232串行通信的测距综合实验设计[J]. 教育现代化, 2019, 6 (68): 134- 136. |
SHAO Jinju , QU Jinyu , GAO Song , et al. Comprehensive experimental design of ranging based on RS232 serial communication[J]. Education Window, 2019, 6 (68): 134- 136. | |
15 | 黄建刚, 张敏, 罗正华. 支持多点远距离通信的RS-232串行总线系统[J]. 成都大学学报(自然科学版), 2017, 36 (2): 172- 175. |
HUANG Jiangang , ZHANG Min , LUO Zhenghua . RS-232 serial bus system supporting multi-point long-distance communication[J]. Journal of Chengdu University (Natural Science Edition), 2017, 36 (2): 172- 175. | |
16 | 张思超.基于uC/OS-Ⅱ的多路信号采集及控制系统[D].济南:山东师范大学, 2016. |
ZHANG Sichao. Multi-channel signal acquisition and control system based on uC/OS-Ⅱ[D]. Jinan: Shandong Normal University, 2016. | |
17 | 楚红雨, 李磊民, 黄玉清, 等. 实时操作系统uC/OS-Ⅱ在ARM9上移植的实现[J]. 计算机工程, 2005, 31 (20): 226- 228. |
CHU Hongyu , LI Leimin , HUANG Yuqing , et al. Implementation of porting RTOS uC/OS-Ⅱ to ARM9[J]. Computer Engineering, 2005, 31 (20): 226- 228. | |
18 | 拉伯罗斯, 邵贝贝. uC/OS-Ⅱ:源码公开的实时嵌入式操作系统[M]. 北京: 中国电力出版社, 2001. |
19 | 梁小骜, 宋庆国, 王勃. uCOS-Ⅲ在Cortex-M4平台上的移植和实现[J]. 电子技术与软件工程, 2017, (16): 199- 201. |
LIANG Xiaoao , SONG Qingguo , WANG Bo . Migration and implementation of uCOS-Ⅲ on the Cortex-M4 platform[J]. Electronic Technology and Software Engineering, 2017, (16): 199- 201. |
[1] | 王泽静1,2,秦敬玉1*,米春旭1. 高精度电阻数据自动采集与动态显示系统设计[J]. 山东大学学报(工学版), 2010, 40(4): 133-137. |
[2] | 孙 科,刘 刚,房建成 . 基于ARM和DSP的嵌入式导航计算机方案设计[J]. 山东大学学报(工学版), 2007, 37(1): 23-26 . |
|