设为首页 |  加入收藏
首页首页 期刊简介 消息通知 编委会 电子期刊 投稿须知 广告合作 联系我们
一种用于穿戴设备的串行通信协议的设计与实现

Design and implementation of a serial communication protocol for the wearable device

作者: 范能胜  张怀岺 
单位:广东医科大学生物医学工程学院(广东东莞 523808) 通信作者:张怀岺,教授 E-mail: huailing@ 163.com
关键词: 穿戴设备;  串行通信;  通信协议;  数据帧;  透明传输 
分类号:R318
出版年·卷·期(页码):2020·39·4(431-436)
摘要:

目的 设计了一种应用于智能穿戴设备的串行通信协议,以满足穿戴设备和移动平台之间数据透明传输的需求。方法 根据传输数据的内容将通信帧分为数据帧。命令帧和响应帧,设计了帧内容的格式;使用转义字符的方法实现数据的透明传输;通信协议用 C 语言进行了实现,给出单字节发送和接收的程序处理流程图;借助单片机实验板(从机)和串口调试助手软件(主机),对协议进行了验证测试。结果 从主机端发送命令帧,然后接收来自从机端的响应帧和数据帧。从测试结果看,从机能够按命令做出正确的响应;同时,当采样数据内容中出现了协议字符时,能够按照协议规定对数据字符进行转换后再行发送。结论 协议解决了数据透明传输的需求,尽管引入转义字符后会降低一部分通信的效率,但提高了通信的可靠性。


Objective A serial communication protocol for the smart wearable device was designed and aimed to meet requirement of the transparent transmission between the wearable device and mobile platform.Methods The communication frame was divided into three types:data frame, command frame and respond frame according to transmission content. The format of frame content was specified. The transparent transmission of data was realized by the escape character. The protocol was implemented with the C programming language and the program flowchart of a single byte sending and receiving was provided. Finally, the communication protocol was tested in the single chip microcontroller experimental board ( Slave) combined with the software of the serial port debugging aid ( Master).Results The command frame was send from Master and then received the respond frame and data frame from Slave. Slave could respond correctly to command frame from Master. Meanwhile, the sampling data could first translate according to the rule of protocol when the escape character was found and then sent. Conclusions This communication protocol solved the problem of transparent transmission. Although the efficiency of communication may decrease after the introduction of escape character, the reliability of communication increased.

参考文献:

[ 1 ] 薛俊伟,黄岳山,杜欣,等.蓝牙低功耗可穿戴血氧监测设备的设计[J].中国生物医学工程学报,2015, 34(6):701-707.

Xue JW, Huang YS, Du X, et al. Design of a wearable device for SpO2 monitoring using BLE [ J ]. Chinese Journal of Biomedical Engineering, 2015, 34(6):701-707.

[ 2 ] 缪洁,徐文龙,徐冰俏.一种可穿戴式心电采集系统的设计[J].中国计量学院学报,2015,26(3):305-310.

Miao J, Xu WL, Xu BQ. Design of a wearable ECG acquisition system[J]. Journal of China University of Metrology, 2015, 26(3):305-310.

[ 3 ] 李承炜,韩俊南,杜欣,等.基于 ADS1293 的穿戴式心电检测装置设计与实现[J].电子技术应用,2017,43(9):8-12.

Li CW, Han JN, Du X, et al. Design and implementation of a wearable ECG device based on ADS1293 [ J]. Application of Electronic Technique, 2017, 43(9):8-12.

[ 4 ] 王建敏,崔俊锋,牛道恒.一种基于串口通信的高可靠性应用协议设计[J].铁路通信信号工程技术,2015,12(1):1-4.

[ 5 ] 宋兵跃,吴军辉,杨学军,等.一种高效的串行通信协议的制定及实现 [J].微型机与应用,2010(7):60-62.

Song BY, Wu JH, Yang XJ, et al. Definition and realization of a high effective protocol on serial communication [ J ].Microcomputer & its Applications, 2010(7):60-62.

[ 6 ] 桂江华,邵健,潘邈.一种高可靠串行通信协议[ J].电子与封装,2016,16(2):40-43.

Gui JH, Shao J, Pan M. A kind of highly reliable serial communication protocol[J]. Electronics & Packaging, 2016, 16

(2):40-43.

[ 7 ] 苌飞霸,尹军,颜乐先,等.可穿戴式人体呼吸状态监测系统的设计[J].电子技术应用,2014,40(1):79-81,85.

[ 8 ] Chang FB, Yin J, Yan LX, et al. Design of wearable human respiratory parameter monitoring system [ J ]. Application of Electronic Technique, 2014, 40(1):79-81, 85.

[ 9 ] 薛冰冰,吴书裕,李亚萍,等.基于 STM32 的微型多参数健康监护终端的设计[J].电子技术应用,2014,40(1):13-16.

Xue BB, Wu SY, Li YP, et al. Design of miniature multi-parameter health monitor based on STM32 [ J]. Application of Electronic Technique, 2014, 40(1):13-16.

[10] 求是科技.单片机通信技术与工程实践[ M].北京:人民邮电出版社,2005.

[11] 潘永雄.新编单片机原理与应用[ M].西安:西安电子科技大学出版社,2011. 

服务与反馈:
文章下载】【加入收藏
提示:您还未登录,请登录!点此登录
 
友情链接  
地址:北京安定门外安贞医院内北京生物医学工程编辑部
电话:010-64456508  传真:010-64456661
电子邮箱:llbl910219@126.com