Page 1
MF855-03 CMOS 4 - BIT SINGLE CHIP MICROCOMPUTER S1C63000 Core CPU Manual...
Page 2
No part of this material may be reproduced or duplicated in any form or by any means without the written permission of Seiko Epson. Seiko Epson reserves the right to make changes to this material without notice. Seiko Epson does not assume any...
Page 3
The information of the product number change Starting April 1, 2001, the product number will be changed as listed below. To order from April 1, 2001 please use the new product number. For further information, please contact Epson sales representative.
3.3.4 Memory write ... 24 3.3.5 Memory read ... 25 3.4 Initial Reset ... 25 3.4.1 Initial reset sequence ... 25 3.4.2 Initial setting of internal registers ... 26 S1C63000 CORE CPU MANUAL CPU M ANUAL ... 4 ... 22...
Page 6
4.2.3 Instruction list by function ... 40 4.2.4 List in alphabetical order ... 48 4.2.5 List of extended addressing instructions ... 55 4.3 Instruction Formats ... 59 4.4 Detailed Explanation of Instructions ... 60 ... 33 EPSON S1C63000 CORE CPU MANUAL...
CHAPTER The S1C63000 is the core CPU of the 4-bit single chip microcomputer S1C63 Family that utilizes original EPSON architecture. It has a large and linear addressable space, maximum 64K words (13 bits/ word) program memory (code ROM area) and maximum 64K words (4 bits/word) data memory (RAM, data ROM and I/O area), and high speed, abundant instruction sets.
QUEUE (16) X (16) Y (16) SP2 (8) SP1 (8) DATA ADDRESS LATCH 1.4 Input-Output Signals Tables 1.4.1 (a) and 1.4.1 (b) show the input/output signals between the S1C63000 and peripheral circuits. Type Terminal name Power supply Clock Address bus IA00–IA15 DA00–DA15...
Page 9
Status signal FETCH STOP BS16 DBS0 DBS1 S1C63000 CORE CPU MANUAL Table 1.4.1(b) Input/output signal list (2) Instruction bus Inputs an instruction code. 16-bit data bus A bidirectional data bus to connect to the RAM (stack RAM) for 16-bit accessing.
CHAPTER 2: ARCHITECTURE CHAPTER This chapter explains the S1C63000 ALU, registers, configuration of the program memory area and data memory area, and addressing. 2.1 ALU and Registers 2.1.1 ALU The ALU (Arithmetic and Logic Unit) loads 4-bit data from a memory or a register and operates the data according to the instruction.
The queue register is accessed by the hardware, so it is not necessary to be aware of the register operation when programming. 2.1.3 Flags The S1C63000 contains a 4-bit flag register (F register) that indicates such things as the operation result status within the CPU. • Z (zero) flag The Z flag is set to "1"...
Page 12
The RETI instruction is used to return from interrupt processing routines (including software interrupts), and returns the F register data that was evacuated when the interrupt was generated. Inverts flag(s) %F,imm4 Evacuates the F register PUSH %F Returns the F register Returns the F register RETI EPSON S1C63000 CORE CPU MANUAL...
2.1.4 Arithmetic operations with numbering system In the S1C63000, some instructions support a numbering system. These instructions are indicated with the following notations in the instruction list. operand,n4 operand,n4 operand,n4 operand,n4 (See "Instruction List" or "Detailed Explanation of Instructions" for the contents of the operand.) "n4"...
2.1.5 EXT register and data extension The S1C63000 has a linear 64K-word addressable space, therefore it is required to handle 16-bit address data. The EXT register and the F flag that extend 8-bit data into 16-bit data permit 16-bit data processing.
Page 15
1.Instructions which have a source and /or a destination operand with the post-increment function, [%X]+ and [%Y]+. 2.Instructions which have [%X] and/or [%Y] in both the source and destination operands. 3.The RETD instruction and the LDB instructions which transfers 8-bit data. S1C63000 CORE CPU MANUAL CHAPTER 2: ARCHITECTURE EPSON...
Page 16
...Works as "JR 0x3A88" ( = C, NC, Z, or NZ) 0x88 %EXT,0xF8 ...Works as "CALR 0xF862" CALR 0x62 See Section 2.2.3, "Branch instructions" for the branch instructions. %YL,imm8 %Y,sign8 %Y,imm8 sign8 JRNC sign8 EPSON sign8 JRNZ sign8 S1C63000 CORE CPU MANUAL...
2.2.1 Configuration of program memory The S1C63000 can access a maximum 64K-word ( 13 bits) program memory space. In the individual model of the S1C63 Family, the ROM of which size is decided depending on the model is connected to this space to write a program and static data.
Page 19
%EXT,0x24 %YL,0x00 Figure 2.2.3.1 shows the operation of the jump instructions and the branch range. S1C63000 CORE CPU MANUAL ...Jumps to the instruction 5 steps after ...Jumps to the instruction 30 steps after ...Sets the bit 0 in the address 0010H to "1" ([0010H] = 5) ...Jumps to the instruction 6 steps after...
Page 20
003FH FFFFH Fig. 2.2.3.1 Operation of jump instructions EPSON Program memory 0000H xxxxH JR %BA xxxxH+256 FFFFH xxxxH+1 BA=0 xxxxH+1 xxxxH+16 BA=255 xxxxH+256 Program memory 0000H JP %Y FFFFH Branch destination absolute address Indirect jump instruction S1C63000 CORE CPU MANUAL...
Figure 2.2.3.2 shows the operation of the call instructions and the branch range. Program memory 0000H xxxxH-32767 xxxxH-127 xxxxH CALR sign8 xxxxH+128 xxxxH+32768 FFFFH S1C63000 CORE CPU MANUAL 256) = 17800 Program memory Program memory 0000H xxxxH-1 %EXT,imm8 xxxxH CALR sign8 xxxxH CALR [addr6]...
;Sets data to be converted CALR TOASCII ;Calls converting routine %BA,[%X]+ ;Loads result from memory to BA register Mainroutine Subroutine sign8 %A,[%X] RET (RETD) RETS Fig. 2.2.3.3 Return from subroutine EPSON NC,1 Return to xxxxH+1 Return to xxxxH+2 S1C63000 CORE CPU MANUAL...
4-bit microcomputers. The S1C63000 has a built-in 16-bit data bus for the address stack (SP1), and a RAM that permits 16-bit data accessing can be connected to the addresses 0000H to 03FFH. The 16-bit accessible area is different depending on the individual models.
LD [%Y]+,[%X]+ LD [%Y],[%X] In addition, the S1C63000 has also provided instructions in order to efficiently access only the area which is accessed frequently such as the I/O memory and lower addresses. One of that is the addressing using the EXT register explained in Section 2.1.5.
0000H to 03FFH. The stack area can be set from an optional address (toward the lower address) using the stack pointer. The S1C63000 contains two stack pointers SP1 and SP2. (1) Stack pointer SP1 The SP1 is used for the address data stack, and permits 16-bit data accessing.
Page 26
Figure 2.3.3.4. The SP2 is decremented after the data is evacuated and is incremented when the data is returned. 8 bits to be modified Fig. 2.3.3.3 SP2 configuration EPSON Stack pointer 2 S1C63000 CORE CPU MANUAL...
2.3.4 Memory mapped I/O The S1C63 Family contains the S1C63000 as the core CPU and various types of peripheral circuits, such as input/output ports. The S1C63000 has adopted a memory mapped I/O system for controlling the peripheral circuits, and the control bits and the registers for exchanging data are arranged in the data memory area.
1/2 cycle of the CLK and the one bus cycle that becomes the instruction execution unit is composed of four states. The clock that is input to the S1C63000 is generated by an oscillation circuit provided outside of the CPU. The S1C63 Family models have a built-in oscillation circuit.
3.3.1 Data bus status The S1C63000 output the data bus status in each bus cycle externally on the DBS0 and DBS1 signals as a 2-bit status. The peripheral circuits perform the direction control of the bus driver and other controls with these signals.
The S1C63000 contains a 4-bit data bus (D0–D3) and a 16-bit data bus (M00–M15) for an address stacking. The CPU switches the data bus according to the instruction. The BS16 signal is provided for this switch- ing.
3.4 Initial Reset The S1C63000 has a reset (SR) terminal in order to start the program after initializing the circuit when the power is turned on or other situations. The following explains the operation at an initial reset and the initial setting of the internal registers.
When all the interrupt processing has finished, the interrupted program is resumed. The S1C63000 has the hardware interrupt function for the peripheral circuits including an NMI (non- maskable interrupt) and the hardware interrupt function. The hardware interrupts excluding the NMI can be set to the DI (disable interrupts) status by setting the I (interrupt) flag.
Further, these instructions may modify the content of the I flag. If these instructions set the I flag (EI status), the interrupt processing is done after executing the next instruction. If these instruc- tions reset the I flag (DI status), interrupts generated after the instruction fetch cycle are masked. S1C63000 CORE CPU MANUAL LDB %EXT,%BA %F,imm4...
Page 34
Fig. 3.5.2.1 NMI sequence (normal acceptance) In this chart, the dummy fetch cycle starts after fetching the "LD %A, [%X]" instruction that follows the "LDB %EXT, imm8" instruction. Fig. 3.5.2.2 NMI sequence (interrupt acceptance after 1 instruction) S1C63000 CORE CPU MANUAL...
"1". Pay attention to the F register setting except when describing such a processing consciously. pc-1 pc+1 INT addr6 DUMMY SP2-1 DUMMY F reg. Fig. 3.5.2.5 Software interrupt sequence EPSON 01addr6H (01addr6H) SP1-1 pc+1 S1C63000 CORE CPU MANUAL...
3.6 Standby Status The S1C63000 has a function that stops the CPU operation and it can greatly reduce power consumption. This function should be used to stop the CPU when there is no processing to be executed in the CPU, example while the application program waits an interrupt.
Page 38
CLK and starts the interrupt processing. T2 T3 T4 T1T2 T3 T4 pc+1 DUMMY FETCH DBS1/0 STOP Oscillation stable waiting time SLEEP status Interrupt processing Fig. 3.6.2.1 Sequence of the shift to SLEEP status and restarting EPSON S1C63000 CORE CPU MANUAL...
CHAPTER NSTRUCTION The S1C63000 offers high machine cycle efficiency and a high speed instruction set. It has 47 basic instructions (412 instructions in all) that are designed as an instruction system permitting relocatable programming. This chapter explains about the addressing modes for memory management and about the details of each instruction.
Page 40
Instructions which have [%X] or [%X]+ as the operand Instructions which have [%Y] or [%Y]+ as the operand ...Increments the content of a memory specified with the addr6 ...Decrements the content of a memory specified with the addr6 EPSON S1C63000 CORE CPU MANUAL...
4.1.2 Extended addressing mode In the S1C63000, when data is written to the EXT register (the E flag is set) and a specific instruction follows, the data specified by that instruction is extended with the EXT register data (see Section 2.1.5).
Table 4.2.1.1 lists the function classifications of the instructions. Table 4.2.1.1 Instruction function classifications Function classification Mnemonic Arithmetic Logic Transfer S1C63000 CORE CPU MANUAL sign8 JRNC sign8 ...Works as "JR 0x6429" ...Works as "JR 0x3A88" ( = C, NC, Z, or NZ) ...Works as "CALR 0xF862" Operation...
... 6-bit address (00H to 3FH) a5–a0 ... Each bit in addr6 00addr6 ... addr6 which specifies an address within 0000H to 003FH FFaddr6 ... addr6 which specifies an address within FFC0H to FFFFH EPSON S1C63000 CORE CPU MANUAL...
Page 45
Operations and others + ... Addition - ... Subtraction Logical product Logical sum Exclusive OR Data load Data exchange Extended addressing mode (EXT.mode) ... Can be used Cannot be used (prohibit use) S1C63000 CORE CPU MANUAL CHAPTER 4: INSTRUCTION SET EPSON...
Page 49
In the SBC and DEC instructions, the "n4" is placed as it is at the low-order 4 bits in the machine code. (However, when 16 is specified to n4, the machine code is generated with 0000H as the low-order 4 bits.) S1C63000 CORE CPU MANUAL CHAPTER 4: INSTRUCTION SET...
Page 53
• X in the machine code row indicates that the bit is valid even though it is "0" or "1", but the assembler generates it as "0". When entering the code directly, such as for debugging, "0" should be entered. S1C63000 CORE CPU MANUAL CHAPTER 4: INSTRUCTION SET Operation...
%EXT,imm8 CALR sign8 4.3 Instruction Formats All the instructions of the S1C63000 are configured with 1 word (13 bits) as follows: 13-bit operation code 9-bit operation code + 4-bit immediate data OP Code 7-bit operation code + 6-bit immediate data...
1 1 0 0 1 1 1 1 1 0 1 1 X Status of the flag – EPSON Number of bus cycles 1 cycle 19F0H, (19F1H) 19F2H, (19F3H) 19F4H, (19F5H) 19F6H, (19F7H) – Does not change Reset Set/reset S1C63000 CORE CPU MANUAL...
N’s adjust ([00imm8] + B + C) (00imm8 = 0000H + 00H to FFH) [FFimm8] N’s adjust ([FFimm8] + B + C) (FFimm8 = FF00H + 00H to FFH) EPSON [10H-n4] 1DD0H–1DDFH [10H-n4] 1DF0H–1DFFH [10H-n4] 1D40H–1D4FH [10H-n4] 1D60H–1D6FH S1C63000 CORE CPU MANUAL 2 cycles...
Page 73
%EXT,imm8 ADC [%Y],0,n4 n4 should be specified with a value from 1 to 16. Note: S1C63000 CORE CPU MANUAL ir + 1 1 1 1 0 1 0 0 0 0 1 1 1 0 1 0 0 1 0 [00imm8] N’s adjust ([00imm8] + 0 + C)
Page 125
SP2 into the F register, then increments the SP2. This instruction is used for returning from interrupt routines. Code: Mnemonic RETI Flags: S1C63000 CORE CPU MANUAL SP1 +1, [X] i3-0, [X+1] 1 0 0 0 1 i7 i6 i5 i4 i3 i2 i1 i0 1100H–11FFH – SP1 +1, F...
Page 151
EPSON HONG KONG LTD. 20/F., Harbour Centre, 25 Harbour Road Wanchai, Hong Kong Phone: +852-2585-4600 Fax: +852-2827-4346 Telex: 65542 EPSCO HX EPSON TAIWAN TECHNOLOGY & TRADING LTD. 10F, No. 287, Nanking East Road, Sec. 3 Taipei Phone: 02-2717-7360 Fax: 02-2712-9164 Telex: 24444 EPSONTB HSINCHU OFFICE 13F-3, No.
Page 152
In pursuit of “Saving” Technology, Epson electronic devices. Our lineup of semiconductors, liquid crystal displays and quartz devices assists in creating the products of our customers’ dreams. Epson IS energy savings.
Page 153
S1C63000 Core CPU Manual ELECTRONIC DEVICES MARKETING DIVISION EPSON Electronic Devices Website http://www.epson.co.jp/device/ First issue July, 1995 Printed February, 2001 in Japan...