Datasheet

56
The following code in Figure 53 is an example of transmission of the single character s.
WDTCTL .equ 0120h
WDTHold .equ 80h
WDT_wrkey .equ 05a00h
TXCHAR .equ 0FFD2h
TXTABLE .equ 0FFD4h
PREPRX .equ 0FFD6h
PREPTX .equ 0FFD8h
INT_RXTX .equ 0FFDAh
TXDATA .equ 020Eh
RXBUF .equ 0210h
.text 0240h
RESET: MOV #03DEh,SP ; use #05DEh on the MSP430X33x
MOV #(WDTHold+WDT_wrkey),&WDTCTL ; stop Watchdog Timer
EINT ; enable interrupt
TX: MOV #0AA55h,&03DEh ; prepare software UART for the use
; in user application
(05DEh FOR MSP430X33x)
MOV.B #a,&TXDATA ; put char to TXDATA
; BIC #01h,&200h ; use only if no special
; treatment of ESC is wanted
CALL &TXCHAR ; call transmit sub-routine in
; monitor
CALL &PREPRX ; prepare software UART for receive
; to get back to monitor with ESC
MOV #00h,&03DEh ; prepare software UART only for
; the use in the Hyperterminal
(05DEh FOR MSP430X33x)
ENDL: JMP ENDL
UART: BR &INT_RXTX
.sect Int_Vect,03E0h ; (use 05E0h on the MSP430X33x)
.word RESET ; Reset
.word RESET ; Reset
.word RESET ; Reset
.word RESET ; Reset
.word RESET ; Reset
.word RESET ; Reset
.word RESET ; Reset
.word RESET ; Reset
.word RESET ; Reset
.word RESET ; Reset
.word RESET ; Reset
.word RESET ; Reset
.word UART ; UART Routine
.word RESET ; Reset
.word RESET ; Reset
.word RESET ; Reset
.end
Figure 53. Transmitting the s Character