Vector Table Setting - NEC 78K0S/K 1+ Series Application Note

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

Advertisement

4.2

Vector Table Setting

In the vector table area, the program start address, which is used when branching occurs due to the generation of
resets and various interrupt requests, is stored.
In this sample program, interrupt servicing is not performed, so only the reset vector which is used during reset
start is set. This setting is required when coding in assembly language. When coding in C language, this setting is not
required, since the reset vector is automatically set in the startup routine.
<R>
For how to set the vector table and interrupts as well as setting examples, refer to
External Interrupt Generated by Switch
[Example 1] Setting only the reset vector to be used during reset start (same as in the sample program setting)
XVCT
<1>
After reset release, the program starts from the address (RESET_START at <1>, above) specified with the
reset vector.
In this sample program, vector table addresses except 0000H are not used. RESET_START is set to all
remaining vector table addresses, as with 0000H. By setting in this way, branching to RESET_START occurs,
even if an interrupt occurs, and the same processing as after reset release is performed.
[Column] What are #pragma directives?
#pragma directives are preprocessing instructions which are used in the C language and are coded at the
beginning of source programs.
The following are major #pragma directives.
• #pragma sfr:
• #pragma ei:
• #pragma di:
• #pragma nop:
• #pragma interrupt: Interrupt functions can be described at the C source level.
For details of the #pragma directives, refer to the chapter regarding expansion functions, in the
Language User's
12
CHAPTER 4 SETTING METHODS
Input".
CSEG
AT
0000H
DW
RESET_START
DW
RESET_START
DW
RESET_START
DW
RESET_START
DW
RESET_START
DW
RESET_START
DW
RESET_START
DW
RESET_START
DW
RESET_START
DW
RESET_START
DW
RESET_START
DW
RESET_START
DW
RESET_START
DW
RESET_START
DW
RESET_START
DW
RESET_START
DW
RESET_START
Operations related to the SFR area can be described at the C source level.
The EI instruction can be described at the C source level.
The DI instruction can be described at the C source level.
The NOP instruction can be described at the C source level. (The clock can be
advanced without operating the CPU.)
Manual.
Application Note U18752EJ2V0AN
Function
Address
name
;(00)
RESET
;(02)
--
;(04)
--
;(06)
INTLVI
;(08)
INTP0
;(0A)
INTP1
;(0C)
INTTMH1
;(0E)
INTTM000
;(10)
INTTM010
;(12)
INTAD
;(14)
--
;(16)
INTP2
;(18)
INTP3
;(1A)
INTTM80
;(1C)
INTSRE6
;(1E)
INTSR6
;(20)
INTST6
"Sample Program (Interrupt)
CC78K0S

Advertisement

Table of Contents
loading

This manual is also suitable for:

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

Table of Contents