;
Initialize the port 13
;-------------------------------------------------------------------------------
MOV
P13,
;-------------------------------------------------------------------------------
;
Initialize the general-purpose register
;-------------------------------------------------------------------------------
MOVW
HL,
;*******************************************************************************
;
;
Main loop
;
;*******************************************************************************
MAIN_LOOP:
MOV
A, P4
AND
A, #00001001B
status
MOV
L, A
the table address
MOV
A, [HL]
MOV
P2, A
BR
$MAIN_LOOP
end
APPENDIX A PROGRAM LIST
#00000001B
; Set output latch of P130 as high
#LEDDATA
; Set the table address to the HL register
; Read switch-input status
; Set switch-input status to the lower 8 bits of
; Output the LED light
; Go to the MAIN_LOOP
Application Note U18752EJ2V0AN
; Mask the data except the switch-input
; Read LED output data from the table
39