摘要
介绍了一种基于C8051F020单片机的RS485串行通信设计方法。利用MAX485芯片实现C8051F020单片机的串口输出电平与RS485的EIA电平之间的转换,通过工业控制计算机安装的RS485通信卡对RS485信号进行收发,并利用Silicon Labs IDE集成开发环境对单片机进行编程与在系统调试,实现计算机与单片机之间的多点串行通信。该设计方法已经应用到某型电子设备中,用于完成多个单片机与多个上位机之间的RS485串行通信,结果表明该套设备的RS485串行通信速率高、距离远,抗干扰能力强,满足设计要求。
This paper expatiates on the design method of RS485 serial communication based on MCU C8051F020.The MAX485 chip is used to complete the conversion between the output level of MCU C8051F020 and EIA level of RS485.The IPC receives or transmits the RS485 signals by RS485 communication card.The single chip microcomputer is programmed and debugged in system by Silicon Labs IDE,and the Multi-point serial communication between PC and MCU is achieved finally.This design method has been applied to a certain type of electronic device,for the RS485 serialcommunication between multiple MCU and multiple PC,the result shows that the RS485 serial communication of the device has high speed,distance,and strong anti-jamming capability,so the design meets the requirements.
出处
《电子测量技术》
2014年第3期121-124,共4页
Electronic Measurement Technology
关键词
单片机
串行通信
RS485
single chip microcomputer
serial communication
RS485