NEC 78K0S/K 1+ Series Application Note page 39

Led lighting switch control sample program (initial settings)
Hide thumbs Also See for 78K0S/K 1+ Series:
Table of Contents

Advertisement

;
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

Advertisement

Table of Contents
loading

This manual is also suitable for:

78k0s/ka1+78k0s/kb1+78k0s/ku1+78k0s/ky1+

Table of Contents