USCI UART A Universal Asynchronous ReceiverTransmitter abbreviated UART
USCI簡介
UART ¨ A Universal Asynchronous Receiver/Transmitter, abbreviated UART, is a type of "asynchronous receiver/transmitter", a piece of computer hardware that translates data between parallel and serial forms. UARTs are commonly used in conjunction with communication standards such as EIA, RS-232, RS 422 or RS-485. The universal designation indicates that the data format and transmission speeds are configurable and that the actual electric signaling levels and methods (such as differential signaling etc. ) typically are handled by a special driver circuit external to the UART. -from Wiki http: //en. wikipedia. org/wiki/Universal_asynchronous_receiver/transmitter
UART ¨ The Universal Asynchronous Receiver/Transmitter (UART) takes bytes of data and transmits the individual bits in a sequential fashion. At the destination, a second UART re-assembles the bits into complete bytes. Each UART contains a shift register, which is the fundamental method of conversion between serial and parallel forms. Serial transmission of digital information (bits) through a single wire or other medium is much more cost effective than parallel transmission through multiple wires. -from Wiki http: //en. wikipedia. org/wiki/Universal_asynchronous_receiver/transmitter
UART in MSP 430 UART Mode
UART in MSP 430
u 0 x 01 UART 01. C u 0 x 03 u 0 x 05 u 0 x 50 Why? ? u 0 x 80
UART 02. C u由Rx接收資料 u兩個人一組,一位執行UART_01 發送資料,另一位執行UART_02接 收資料觀察UCA 0 RXBUF或value的 值 UART_01 UART_02 (Transmitter) (Receiver) Tx. Rx. GND- -Rx -Tx -GND u上述哪一條線可拿掉而不影響結 果? ? Why?
UART 06. C PC RS 232 u試由超級終端機觀察由實驗板 傳來的字元 RS 232 Driver MCU UART MSP 430 Tx(P 1. 2)GND- http: //en. wikipedia. org/wiki/File: ASCII_Code_Chart. svg u試更改程式,只傳大寫的A至Z 字元
UART 07. C PC RS 232 u試由超級終端機觀察由實驗板 傳來的字元 RS 232 Driver MCU UART MSP 430 Tx(P 1. 2)GND-
UART 08. C PC RS 232 u開啟Serial. Read 01. VI觀察傳來 的溫度值變化 RS 232 Driver MCU UART MSP 430 Tx(P 1. 2)GND-
UART 09 -1. C u大於 1 byte之數據傳輸 UART_09 Tx. Rx. GND-
UART 09 -1. C u大於 1 byte之數據傳輸 ADC 10 MEM 0000 00 XX XXXX 2 bytes 包裝 000 X XXXX send-h 100 X XXXX send-l 000 X XXXX get-h 100 X XXXX get-l 重組 0000 00 XX XXXX result
UART 09 -1. C u大於 1 byte之數據傳輸(資料包裝) ADC 10 MEM 0000 00 XX XXXX 2 bytes ADC 10 MEM > > 5 (右移 5 bits) 000 X XXXX send-h 資料順序 0 x 001 F & ADC 10 MEM MASK 0001 & …XX XXXX 000 X + 0 x 80 1000 1 資料順序 1111 XXXX 0000 100 X XXXX send-l 資料順序 u觀察ADCMEM, send_h, send_l 三個值之間的關係(binary模式)
UART 09 -1. C u大於 1 byte之數據傳輸(資料重組) 000 X XXXX get-h 100 X XXXX get-l (unsigned int)(get_h << 5 ) 左移 5 bits 0000 00 XX XXX 0 0000 (unsigned int)(get_l & 0 x 1 F ) 以mask取值並去除資料順序編碼 100 X XXXX & 0001 1 1 000 X XXXX 0000 00 XX XXX 0 0000 + 0000 000 X XXXX 0000 00 XX XXXX u觀察ADCMEM, send_h, send_l, get_h, get_l, result 值之間的關係 (binary模式)
- Slides: 22