J4 ›› 2013, Vol. 26 ›› Issue (1): 69-73.doi: 10.3976/j.issn.1002-4026.2013.01.015

• 目录 • 上一篇    下一篇

C8051F120单片机串口扩展与通讯设计

朱思荣,周万里,毕春元,赵晓华,高广恒,刘仲汇   

  1. 山东省科学院生物研究所,山东省生物传感器重点实验室,山东 济南 250014
  • 收稿日期:2012-07-12 出版日期:2013-02-20 发布日期:2013-02-20
  • 作者简介:朱思荣 (1963-)男,硕士,研究员,研究方向为生物传感器和产品开发。Email: yanzhi@sdas.org
  • 基金资助:

    国家高技术研究发展计划(863计划)(2012AA021201)

Serial port expansion and communication design of MCU C8051F120

 ZHU Si-Rong, ZHOU Wang-Li, BI Chun-Yuan, ZHAO Xiao-Hua, GAOGuang-Heng, LIU Zhong-Hui   

  1. Shandong Provincial Key Laboratory of Biosensors, Biology Institute, Shandong Academy of Sciences, Jinan 250014, China
  • Received:2012-07-12 Online:2013-02-20 Published:2013-02-20

摘要:

在发酵控制器设计中,应用C8051F120单片机的PCA模块,用软件摸拟法扩展出1个半双工串口;使用MAX485芯片在1个串口中扩展出多个485总线,成功解决了多机通讯串口不足的问题。用PCA模块扩展的串口,数据接收或发送均在PCA中断进行,只占用很少的CPU时间,除中断次数较多外,可与硬件串口一样使用;用1个串口扩展的多条485总线,可以把多个采用不同通讯协议的下位机联接在1个串口中完成顺序通讯,较单485总线方式增加了系统应用的灵活性。

关键词: 串口扩展, 模拟串口, 485总线

Abstract:

We employ the PCA modules of MCU C8051F120 and software simulation to extend a halfduplex serial port in the design of a fermentation controller. We extend multiple 485 bus in one serial port with the chip MAX485, so solve the problem of serial port deficiency. The extended serial port using PCA modules send or receive data in interruption mode of PCA, so it occupies very little CPU time. It can be used as hardware serial ports besides more interruption times. Multiple extended 485 bus from one serial port can connect multiple lower computers with different protocols and different baud rate to complete the sequence communication. Application flexibility is significantly improved, as compared with single 485 bus.

Key words: serial port extension, serial port simulation, multiple 485 bus

中图分类号: 

  • TP399