English
Language : 

SLAS191A Datasheet, PDF (74/86 Pages) Texas Instruments – Starter Kit Evaluation Kit Manual
ENDL
UART
MOV
#00h,&03DEh
JMP
ENDL
BR
&INT_RXTX
.sect “Int_Vect”,03E0h
.word RESET
.word RESET
.word RESET
.word RESET
.word RESET
.word RESET
.word RESET
.word RESET
.word RESET
.word RESET
.word RESET
.word RESET
.word UART
.word RESET
.word RESET
.word RESET
.end
; receive to get back to monitor
; with ESC
; prepare software UART only for
; use in the ROM-Monitor
(&05DEh on the MSP430X33
; 05E0h on the MSP430X33x
; Reset
; Reset
; Reset
; Reset
; Reset
; Reset
; Reset
; Reset
; Reset
; Reset
; Reset
; Reset
; UART Routine
; Reset
; Reset
; Reset
5.6 Receiving a Character
A character received using the RS232 interface is written from the INT_RXTX interrupt routine into memory
location 210h. After performing a reset, this memory location contains zeros. Each byte (not equal to zero)
received is stored in memory location 210h.
The content of memory location 210h is checked to determine whether or not a byte has been received. After
reading the byte, this location must be cleared. The next-received character will overwrite memory location
210h with a new byte.
The following code is an example of receiving a character and transmitting the same character back.
WDTCTL
WDTHold
WDT_wrkey
TXCHAR
TXTABLE
PREPRX
PREPTX
INT_RXTX
TXDATA
RXBUF
RESET
RX
.equ 0120h
.equ 80h
.equ 05a00h
.equ 0FFD2h
.equ 0FFD4h
.equ 0FFD6h
.equ 0FFD8h
.equ 0FFDAh
.equ 020Eh
.equ 0210h
.text 0240h
MOV
#03DEh,SP
; #05DEh on the MSP430X33x
MOV
#(WDTHold+WDT_wrkey),&WDTCTL ; stop Watchdog Timer
EINT
; enable interrupt
MOV
#0AA55h,&03DEh ; select user interrupt vector
; table (&05DEh on MSP430X33x)
CALL
&PREPRX
; prepare software UART for
5–8