2009年8月27日 星期四

UART 速記

UART : Universal Asynchronous Receiver/Transmitter

* serail communication
* start bit, data bit, (parity bit,) stop bit
+ data: 5~8 bit
+ parity bit is optional
+ stop bit: 1, 1.5, 2 bit
* start bit => 與bus idle state相反的polarity
* stop bit => 與bus idle state相同的polarity
+ 通常idle state為1 => start bit為0, stop bit為1
* LSB 先送 [重要!!!]
* 若沒收到stop bit則資料無效 (framing error)
* 注意baud rate設定
* bit-banging : 手動控制收發時間訊號 (更詳盡的解釋?)
* loop-back test

* 收發兩邊的設定要一致 (baud rate, start/data/parity/stop bit)

----
參考資料
wiki
society of robots

0 回應: