Specifications

S1C6S2N7 TECHNICAL SOFTWARE EPSON II-13
CHAPTER 2: INITIAL RESET
;
LD X,0 ;
LD Y,0 ;
LD A,0 ;
LD B,0 ;
RST F,0 ;
EI ;Enable interrupt
The above program is a basic initialization program for the
S1C6S2N7. The setting data are all initialized as shown in
Table 2.1.1 by executing this program. When using this
program, add setting items necessary for each specific
application. (Figure 2.2.1 is the flow chart for this program.)
Reset register flags
Initialization
Reset
I (Interrupt flag)
D (Decimal adjustment flag)
Clear RAM
Set SP
Reset timer,
stopwatch timer
Enable timer interrupt
Enable motor driver interrupt
Reset registers (X, Y, A, B)
flags (I, Z, D, C)
EI (enable interrupt)
I : Interrupt flag
D : Decimal adjustment flag
Clear data RAM (00H to 04FH)
Clear segment RAM (90H to 0AFH)
Set stack pointer to 40H
Enable timer interrupt 2 Hz, 8 Hz, 32 Hz
Stopwatch timer interrupt is masked
Enable motor driver interrupt
Enable input interrupt Enable K03–K00 input port interrupt
To next process
Fig. 2.2.1
Flow chart of the initialization
program