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

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

Advertisement

----------------------------------------------------------------------------*/
P13
= 0b00000001;
}
/*****************************************************************************
Main loop
*****************************************************************************/
void main(void){
const unsigned char OUTDATA[10] = {0x03,0x05,0x07,0x07,0x07,0x07,0x07,
/* Array of LED output pattern */
unsigned char INDATA;
while(1){
INDATA = P4 & 0b00001001;
P2 = OUTDATA[INDATA];
}
}
op.asm (Common to assembly language and C language versions)
;=============================================================================
;
;
Option byte
;
;=============================================================================
OPBT
CSEG
AT
DB
10011100B
;
;
;
;
DB
11111111B
;
||||||||
;
++++++++----------- All blocks can be written or erased
end
42
APPENDIX A PROGRAM LIST
0080H
; Option byte area
||||
|||+----------- Low-speed internal oscillator can be
|++------------ High-speed internal oscillation clock
+-------------- P34/RESET pin is used as RESET pin
; Protect byte area (for the self programming
; mode)
Application Note U18752EJ2V0AN
/* Set output latches of P120-P123 as */
/* high */
0x07,0x06,0x07};
/* Switch-input variable */
/* Valid switch-input status */
/* Read LED output data from the table */
stopped by software
(8MHz) is selected for system clock source

Advertisement

Table of Contents
loading

This manual is also suitable for:

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

Table of Contents