Datasheet
5–7
In Figure 5–3, the endless loop at the end of the program can be interrupted by pressing <ESC> in the
HyperTerminal. If no special treatment of <ESC> is required in the software UART, bit 0 in RAM location 200h
must be cleared. This bit is the ESC-active-flag and allows itself to return back to the Hyperterminal when
pressing the ESC key.
Conditions for implementation:
• Correct setting of the P0.1 interrupt vector in the user interrupt vector table
• The first statement of the user interrupt handler is an absolute branch to the INT_RXTX interrupt
service routine.
• GIE is enabled.
• The halfduplex software UART is set up to receive.
NOTE: Clear the Bit Pattern AA55h
Do not try to load a program while the bit pattern AA55h is stored at address 3DEh on
the MSP430x32x, or 5DEh on the MSP430x33x. To load a new program, clear the bit
pattern AA55h at address 3DEh on the MSP430x32x, or 5DEh on the MSP430x33x, or
switch off the STK/EVK for a short time to clear the RAM.
5.5 Transmitting a String
The first step to transmit a string is to move the bit pattern AA55h to memory location 3DEh on the
MSP430x32x, or 5DEh on the MSP430x33x. The address of the string must be stored in register R11.
The following program transmits the TEST String:
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
.data 0300h
STRING: .string “TEST”
.byte 0h
.text 0240h
RESET: MOV #03DEh,SP ; #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 on the MSP430X33x
MOV #STRING,R11 ; Test: TX_table
; BIC #01h,&200h ; use only if no special
; treatment of ESC is wanted
CALL &TXTABLE ; call transmit sub-routine in
; monitor
(05DEh on the MSP430X33x
CALL &PREPRX ; prepare software UART for