【摘要】嵌入式系统作为电脑系统,用户无法直接看见,但它却可以作为许多更加复杂设备的组件。这样的应用在实际生活中随处可见,比如小型手机,发动机控制,自动取款机,计算机外围设备等等。 所有的IBM PC以及兼容机都是安装两个串行通信接口、一个并行接口,虽然这两种接口都是作为外围设备通信使用的,工作方式却全然不同。 一个并行接口通过8根相隔开的数据线发送、接收8个字节的数据,这样数据传输得更快。然而,由于所包含单独数据线数目的缘故,数据线的体积大。并行接口通常用来连接单片机和打印机,很少用以其他用途。一个串行接口则是通过一根数据线一次发送、接收一个字节的数据,故按此方法发送一比特的数据需要8次,但数据线只需一根。事实上,只需三根就可以实现两种混合通信:一根用以发送,一根用以接收,第三根作为普通的信号地线。 几乎所有的PC都必须遵守串行这个普遍的通信协议,切不可与通用的串行总线相混淆。绝大多数的计算机都装有两支基于RS-232的串行 by many devices for instrumentation; numerous GPIB-compatible devices also come with an RS-232 port. Furthermore, serial communication can be used for data acquisition in conjunction with a remote sampling device. The concept of serial communication is simple. The serial port sends and receives bytes of information one bit at a time. Although this is slower than parallel communication, which allows the transmission of an entire byte at once, it is simpler and can be used over longer distances. For example, the IEEE 488 specifications for parallel communication state that the cabling between equipment can be no more than 20 meters total, with no more than 2 meters between any two devices; serial, however, can extend as much as 1200 meters. 【Keywords】 Embedded System Serial Communication ActiveX Control Communication Protocol 目 录 引 言 1 第一章 串行通信基础 2 1.1 串行通信的基础概念 2 1.1.2波特率 4 1.1.3数据位与停止位 4 1.1.4流控制 5 1.1.5奇偶校验 5 1.2 电气特性 5 1.3 其它通信方式 9 第二章 串行通信控件 11 2.1 前言 11 2.2 用visual basic 6.0进行串行通信程序设计的方法 11 2.3 MSComm控件使用详解 11 第三章 串行通信协议设计
|
|