一种灵活高效的RS485即插即用的控制方法

张晓鹏

集成电路与嵌入式系统 ›› 2023, Vol. 23 ›› Issue (5) : 25-28.

PDF(1235 KB)
PDF(1235 KB)
集成电路与嵌入式系统 ›› 2023, Vol. 23 ›› Issue (5) : 25-28.
技术纵横

一种灵活高效的RS485即插即用的控制方法

  • 张晓鹏
作者信息 +

A Flexible,Efficient and Plug-and-Play RS485 Control Method

  • Zhang Xiaopeng
Author information +
文章历史 +

摘要

针对RS485总线不定数量的从站即插即用的难题,本文以光电模组检测需求为例,提出一种基于单片机设备唯一标识符的RS485总线即插即用的软件控制方法。该方法无需改动硬件电路即可实现RS485总线上的从站数量扫描、从站地址自动分配和从站热拔插检测等功能,并通过实验验证了该方法的有效性和灵活性,从面满足了使用者对从站任意拔插的需求。

Abstract

With regard to the plug-and-play problems of the uncertain number of slave stations on RS485 bus,taking the detection requirements of photoelectric modules as an example,a plug-and-play software control method of RS485 bus based on the unique identifier of single chip microcomputer equipment is proposed in the paper.Without changing the hardware circuit,through this method,functions including scanning the number of slave stations,automatically distributing the addresses of slave stations and hot plug detecting for slave stations in the RS485 buses can all be realized.In addition,the effectiveness and flexibility of this method can be proved by experimental data,which solves the problems of user’s demand for arbitrary plugging of the slave stations.

关键词

RS485 / STM32G473 / 设备唯一标识符 / 即插即用 / 热拔插

Key words

RS485 / STM32G473 / device unique identifier / plug-and-play / hot plug

引用本文

导出引用
张晓鹏. 一种灵活高效的RS485即插即用的控制方法[J]. 集成电路与嵌入式系统. 2023, 23(5): 25-28
Zhang Xiaopeng. A Flexible,Efficient and Plug-and-Play RS485 Control Method[J]. Integrated Circuits and Embedded Systems. 2023, 23(5): 25-28
中图分类号: TP273   

参考文献

[1] 刘晨峰.一种基于RS485的异步串行通信设计[J].中国新通信,2019,21(10):21-23.
[2] 陈彬,陈从靖.基于高速串行总线的分布式RS485串口通信接口设计[J].工业控制计算机,2021,34(11):12-13.
[3] 温子祺.ARM Cortex-M4微控制器深度实战[M].北京:北京航空航天大学出版社,2018.
[4] 陶洋.网络系统特性研究与分析[M].北京:国防工业出版社,2014.
[5] 杨希桐.浅谈RS-485通信网络对配套电缆的要求[J].中国新通信,2020,22(10):24.
[6] 张莉,邬宝寅.一种改进型RS485总线设计[J].自动化与仪表,2016,31(10):32-35.
[7] 张加易,柏思忠.RS485总线型即插即用技术研究及实现[J].自动化与仪器仪表,2016(8):87-88.
[8] ST Microelectronics.RM0440 Reference Manual-STM32G4 Series[EB/OL].[2023-01].https://www.st.com/en/microcontrollers-microprocessors/stm32g473rc.html.
[9] 杭春烁,金豫,洪若昕.一种基于DMA方式的高效UART收发机制[J].单片机与嵌入式系统应用,2021,21(5):22-24.
[10] 马涛.DCS和PLC通讯技术在给煤机中的应用[J].科学与财富,2017(24):161.
[11] 邰鸣,李双田.基于RS485通信方式的多单片机控制系统[J].微计算机应用,2008,29(7):109-112.

PDF(1235 KB)

Accesses

Citation

Detail

段落导航
相关文章

/