差别
这里会显示出您选择的修订版和当前版本之间的差别。
两侧同时换到之前的修订记录 前一修订版 后一修订版 | 前一修订版 | ||
rs-232 [2017/03/26 19:05] gongyu |
rs-232 [2021/02/06 16:27] (当前版本) gongyusu |
||
---|---|---|---|
行 1: | 行 1: | ||
- | 将FPGA和PC连接的最简单的方式就是通过一个串行接口,我们只需要一个发送器和一个接收器模块。 | + | ## RS-232串行接口 |
- | 异步发送器 | + | An RS-232 interface has the following characteristics: |
- | 它产生一个叫"TxD"的信号,通过将数据串行化进行传输. | + | * Uses a 9 pins connector "DB-9" (older PCs use 25 pins "DB-25"). |
- | {{ :serialtxdmodule.gif |}} | + | * Allows bidirectional full-duplex communication (the PC can send and receive data at the same time). |
+ | * Can communicate at a maximum speed of roughly 10KBytes/s. | ||
- | 异步接收器: | + | ### DB-9连接器 |
- | 它从FPGA外部接收一个叫"RxD"的信号,并在FPGA内部进行“串变并”转换以便更方便地进行数据处理。 | + | |
- | {{ :serialrxdmodule.gif |}} | + | You probably already saw this connector on the back of your PC. |
+ | {{ :serialconnector.jpg |}} | ||
- | 这个项目分为5个部分: | + | It has 9 pins, but the 3 important ones are: |
- | * RS-232串行接口是如何工作的: | + | * pin 2: RxD (receive data). |
- | * 波特率发生器 | + | * pin 3: TxD (transmit data). |
- | * 发送器 | + | * pin 5: GND (ground). |
- | * 接收器 | + | |
- | * 应用案例 | + | Using just 3 wires, you can send and receive data. |
+ | |||
+ | Data is commonly sent by chunks of 8 bits (we call that a byte) and is "serialized": the LSB (data bit 0) is sent first, then bit 1, ... and the MSB (bit 7) last. | ||
+ | |||
+ | |||
+ | ### 资源链接 | ||
+ | * 一个简短的[[http://penguin.dcs.bbk.ac.uk/academic/technology/physical-layer/asynchronous/|关于异步通信的页面]] | ||
+ | * 一个[[http://www.taltech.com/datacollection/articles/serial_intro|关于RS232串行通信的介绍]] |