Page 1
CMOS 16-BIT SINGLE CHIP MICROCOMPUTER S1C17704 TECHNICAL MANUAL...
Page 2
Seiko Epson. Seiko Epson reserves the right to make changes to this material without notice. Seiko Epson does not assume any liability of any kind arising out of any inaccuracies contained in this material or due to its application or use in any product or circuit and, further, there is no representation that this material is applicable to products requiring high level reliability, such as, medical products.
Page 3
S1C17704 Technical Manual Revision History Code No. Page Chapter/Section Contents 411511901 1.1 Features Descriptions modified. Shipping form Part number for plastic package modified. Part number for package modified. Descriptions added. • VFBGA10H-144 package (10 mm 10 mm 1.0 mm, ball pitch: 0.8 mm) 1.3.1 Pin Arrangement...
4.4 Heavy Load Protection Function ..................4-5 4.5 Details of Control Registers .....................4-6 0x5120: V Control Register (VD1_CTL) ................. 4-7 0x50a3: LCD Voltage Regulator Control Register (LCD_VREG) ..........4-8 0x50a4: LCD Power Voltage Booster Control Register (LCD_PWR) ........4-9 4.6 Precautions ........................4-10 EPSON S1C17704 TECHNICAL MANUAL...
Page 11
0xffff90: Debug RAM Base Register (DBRAM) ................ 24-5 25 Basic External Wiring Diagram ................25-1 26 Electrical Characteristics ..................26-1 26.1 Absolute Maximum Rating ....................26-1 26.2 Recommended Operating Conditions ................26-1 26.3 DC Characteristics ......................26-2 26.4 Analog Circuit Characteristics ..................26-3 26.5 Current Consumption ....................26-5 EPSON S1C17704 TECHNICAL MANUAL...
Page 12
Appendix C Power Saving ................... AP-30 C.1 Power Saving by Clock Control ................... AP-30 C.2 Power Saving by Power Supply Control ............... AP-33 Appendix D Precautions on Mounting ............... AP-34 Appendix E Initialize Routine ..................AP-38 EPSON viii S1C17704 TECHNICAL MANUAL...
The S1C17704 is a 16-bit MCU that features high-speed operation, low power consumption, small size, large address space, and on-chip ICE. The S1C17704 consists of an S1C17 CPU Core, a 64K-byte Flash memory, a 4K-byte RAM, serial interface modules (UART that supports high bit rate and IrDA 1.0, SPI and I C) for connecting various sensor modules, 8-bit timers, 16-bit timers, a PWM &...
1 OVERVIEW 1.1 Features The main functions and features of the S1C17704 are outlined below. • Seiko Epson original 16-bit RISC CPU core S1C17 Main (OSC3) oscillator • Crystal/ceramic oscillator 8.2 MHz (max.) • CR oscillator 2.2 MHz (max.) Sub (OSC1) oscillator •...
Page 17
N.C. COM31 COM22 SEG56 SEG65 N.C. N.C. N.C. N.C. N.C. Figure 1.3.1.2 Pin Arrangement (PFBGA6U96) Note: The LCD driver cannot be used with the PFBGA6U96 package. It should be used with COM31 to 16 left open. EPSON S1C17704 TECHNICAL MANUAL...
I/O I (Pull-UP)Input/output port pin*/SPI data output pin P20/SDI I/O I (Pull-UP)Input/output port pin*/SPI data input pin P17/#SPISS I/O I (Pull-UP)Input/output port pin (with interrupt)*/SPI slave select input pin P16/EXCL0 I/O I (Pull-UP)Input/output port pin (with interrupt)*/T16 Ch.0 external clock input pin EPSON S1C17704 TECHNICAL MANUAL...
2 CPU 2 CPU The S1C17704 contains the S1C17 Core as its core processor. The S1C17 Core is a Seiko Epson original 16-bit RISC-type processor. It features low power consumption, high-speed operation, large address space, main instructions executable in one clock cycle, and a small sized design.
2 CPU 2.2 CPU Registers The S1C17 Core contains eight general-purpose registers and three special registers. Special registers General-purpose registers bit 23 bit 0 bit 23 bit 0 IL[2:0] Figure 2.2.1 Registers EPSON S1C17704 TECHNICAL MANUAL...
Page 26
Exclusive OR of general-purpose register and immediate %rd,%rs Logical inversion between general-purpose registers (1's complement) not/c Supports conditional execution (/c: executed if C = 1, /nc: executed if C = 0). not/nc %rd,sign7 Logical inversion of general-purpose register and immediate (1's complement) EPSON S1C17704 TECHNICAL MANUAL...
Page 27
32-bit data in which the eight high-order bits are set to 0 is written to the memory. During reading from a memory, the eight high-order bits of the read data are ignored. ∗2 The S1C17704 does not include a coprocessor. Therefore, the coprocessor instructions are not available. EPSON...
Page 28
Memory addressed by general-purpose register with address pre-decremented Stack pointer [%sp],[%sp+imm7] Stack [%sp]+ Stack with address post-incremented [%sp]- Stack with address post-decremented -[%sp] Stack with address pre-decremented imm3,imm5,imm7,imm13 Unsigned immediate (numerals indicating bit length) sign7,sign10 Signed immediate (numerals indicating bit length) EPSON S1C17704 TECHNICAL MANUAL...
The vector table is located at address 0x8000 in the S1C17704. The vector table base address can be read out from TTBR (Vector Table Base Register) located at address 0xffff80.
2 CPU 2.5 Processor Information The S1C17704 has the Processor ID Register (0xffff84) shown below that allow the application software to identify CPU core type. 0xffff84: Processor ID Register (IDIR) Register name Address Name Function Setting Init. R/W Remarks Processor ID 0xffff84 D7–0 IDIR[7:0]...
3 MEMORY MAP, BUS CONTROL 3 Memory Map, Bus Control Figure 3.1 shows the S1C17704 memory map. Peripheral function (Device size) 0xff ffff Reserved for core I/O area reserved – 0x5360–0x5fff (1K bytes, 1 cycle) Remote controller (8 bits) 0x5340–0x535f...
This prolongs the instruction fetch cycle for the number of data area access cycles. • When the S1C17704 executes the instruction stored in the Flash area and accesses data in the Flash area, display RAM area or internal peripheral area 2 (0x5000–) •...
1 to 5 cycles. 3.2.2 Flash Programming The S1C17704 supports on-board programming of the Flash memory, it makes it possible to program the Flash memory with the application programs/data by using the debugger through the ICD Mini. Furthermore, the S1C17704 supports self-programming by the application program stored in the Flash memory.
3 MEMORY MAP, BUS CONTROL 3.2.4 Access Control for the Flash Controller The S1C17704 on-chip Flash memory is accessed via the exclusive Flash controller. A MISC register is used to set the access condition for the Flash controller. Setting number of read access cycles for the Flash controller In order to read data from the Flash memory properly, set the appropriate number of read access cycles according to the CCLK frequency using the FLCYC[2:0] bits (D[2:0]/MISC_FL register).
3.3.1 Internal RAM The S1C17704 contains a RAM in the 4K-byte area from address 0x0 to address 0xfff. The RAM is accessed in one cycle for both reading and writing and allows high-speed execution of the instruction codes copied into it as well as storing variables and other data.
3.4.2 Access Control for the SRAM Controller The S1C17704 display RAM is accessed via the exclusive SRAM controller. A MISC register is used to set the access condition for the SRAM controller. Setting number of access cycles for the SRAM controller In order to read/write data from/to the display RAM properly, set the appropriate number of access cycles according to the CCLK frequency using the SRCYC[1:0] bits (D[1:0]/ MISC_SR register).
0x4342 I2C_CTL C Control Register Controls the I C operation and indicates transfer status. 0x4344 I2C_DAT C Data Register Transmit/receive data 0x4346 I2C_ICTL C Interrupt Control Register Controls the I C interrupt. 0x4348–0x435f – – Reserved EPSON S1C17704 TECHNICAL MANUAL...
Page 39
P1 Port Pull-up Control Register Controls the P1 port pull-up resistor. 0x5214 P1_SM P1 Port Schmitt Trigger Control Register Controls the P1 port Schmitt trigger input. 0x5215 P1_IMSK P1 Port Interrupt Mask Register Enables/disables the P1 port interrupt. EPSON S1C17704 TECHNICAL MANUAL...
Page 40
Indicates/resets interrupt occurrence status. 0x5348–0x535f – – Reserved Note: Do not access the “Reserved” address in the table above and unused areas in the peripheral area that are not described in the table from the application program. EPSON 3-10 S1C17704 TECHNICAL MANUAL...
0xffff90 DBRAM Debug RAM Base Register Indicates the debug RAM base address. See Section 2.4, “Vector Table,” and Section 2.5, “Processor Information,” for TTBR and IDIR, respectively. For DBRAM, see Chapter 24, “On-chip Debugger (DBG).” EPSON S1C17704 TECHNICAL MANUAL 3-11...
Page 42
3 MEMORY MAP, BUS CONTROL THIS PAGE IS BLANK. EPSON 3-12 S1C17704 TECHNICAL MANUAL...
4 POWER SUPPLY 4 Power Supply 4.1 Power Supply Voltage The operating voltage range of the S1C17704 is as follows: For normal operation: 1.8 V to 3.6 V For Flash programming: 2.7 V to 3.6 V Supply a voltage within the range to the V pins with the V pins as the GND level.
4 POWER SUPPLY 4.2 Internal Power Supply Circuit The S1C17704 has a built-in power supply circuit shown in Figure 4.2.1 to generate all the power voltages required for the internal circuits. The power supply module consists of three circuits. Table 4.2.1 Power Supply Circuit...
Switching the operating mode The S1C17704 has two kinds of operating modes. 1. Normal operation mode This mode is provided for running the application program.
Page 46
1.8 to 2.7 V – (use prohibited) program 2.7 to 3.6 V Used Other than 0x0 2.7 to 3.6 V Not used For the DSPC[1:0] settings, see “0x50a0: LCD Display Control Register (LCD_DCTL)” in Section 22.8. EPSON S1C17704 TECHNICAL MANUAL...
∗ LHVLD: LCD Heavy Load Protection Mode Bit in the LCD Voltage Regulator Control (LCD_VREG) Register (D4/0x50a3) Note: Current consumption increases in heavy load protection mode, therefore do not set heavy load protection mode with software if unnecessary. EPSON S1C17704 TECHNICAL MANUAL...
Controls the LCD voltage booster. The following describes each power control register. These are all 8-bit registers. Note: When setting the registers, be sure to write a 0, and not a 1, for all “reserved bits.” EPSON S1C17704 TECHNICAL MANUAL...
= 1.8 V, default setting). It should be set to 1 before erasing/ programming the Flash memory. Note: When the operating mode is switched, the internal operating voltage requires 5 ms (max.) to stabilize. Flash memory programming should be started after the stabilization time has elapsed. EPSON S1C17704 TECHNICAL MANUAL...
The LCD system voltage regulator enters heavy load protection mode by writing 1 to LHVLD and it ensures stable V –V outputs. Use the heavy load protection function when the LCD display has inconsistencies in density. Current consumption increases in heavy load protection mode, therefore do not set if unnecessary. D[3:0] Reserved EPSON S1C17704 TECHNICAL MANUAL...
Note: When the power voltage booster is turned on, the V output voltage requires about 1 ms to stabilize. Do not switch the power source for the LCD system voltage regulator to V until the stabilization time has elapsed. EPSON S1C17704 TECHNICAL MANUAL...
LCD system voltage regulator to V until the stabilization time has elapsed. • Current consumption increases in heavy load protection mode, therefore do not set heavy load protection mode with software if unnecessary. EPSON 4-10 S1C17704 TECHNICAL MANUAL...
By setting the #RESET pin to low level, the S1C17704 enters initial reset state. In order to initialize the S1C17704 for sure, the #RESET pin must be held at low for more than the prescribed time (see Section 26.6, “AC Characteristics”) after the power supply voltage is supplied.
5.1.3 Resetting by the Watchdog Timer The S1C17704 has a built-in watchdog timer to detect runaway of the CPU. The watchdog timer overflows if it is not reset with software (due to CPU runaway) in four-second cycles. The overflow signal can generate either NMI or reset.
SLEEP mode is canceled may be longer than that indicated in the figure below. OSC3 clock #RESET Reset canceled Internal reset Internal reset canceled Internal data request Internal data address Boot vector Oscillation stabilization Booting waiting time Figure 5.2.1 Operation Sequence Following Cancellation of Initial Reset EPSON S1C17704 TECHNICAL MANUAL...
The internal peripheral modules are initialized to the default values (except some undefined registers). Change the settings with software if necessary. For the default values set at initial reset, see the list of I/O registers in Appendix or descriptions for each peripheral module. EPSON S1C17704 TECHNICAL MANUAL...
S1C17 Core to execute the handler when an interrupt occurs. The vector table is located at address 0x8000 in the S1C17704. The vector table base address can be read out from TTBR (Vector Table Base Register) located at address 0xffff80.
1. Those interrupt flags are reset when the interrupt signal is negated by the interrupt source. For the occurrence conditions of the causes of interrupt and the module specific settings, refer to the section that describes the interrupt source module. EPSON S1C17704 TECHNICAL MANUAL...
S1C17 Core must be set to 1 to actually generate an interrupt. If the IE bit has been set to 0, the S1C17 Core cannot accept a maskable interrupt request. In this case, the interrupt request sent from the ITC is held and it will be accepted after the IE bit is set to 1. EPSON S1C17704 TECHNICAL MANUAL...
If another cause of interrupt of higher priority occurs during outputting an interrupt request signal, the ITC changes the vector number and interrupt level to that of the new cause of interrupt. The first interrupt request is left pending. EPSON S1C17704 TECHNICAL MANUAL...
The software writes 1 to the interrupt flag to reset. Figure 6.3.5.1 Pulse Trigger Mode Note: The following S1C17704 interrupts use pulse trigger mode. When an interrupt occurs, reset (write 1 to) the interrupt flag IIFTx in the interrupt handler routine.
Page 63
The interrupt source negates the interrupt signal. Figure 6.3.5.2 Level Trigger Mode Note: The following S1C17704 interrupts use level trigger mode. The interrupt handler routine must reset (write 1 to) the interrupt flag provided in the peripheral module, not EIFTx.
When the interrupt handler routine is terminated by the reti instruction, the PSR is restored to its previous status before the interrupt has occurred. The program restarts processing after branching to the instruction next to the one that was being executed when the interrupt occurred. EPSON S1C17704 TECHNICAL MANUAL...
6 INTERRUPT CONTROLLER (ITC) 6.4 NMI In the S1C17704, the watchdog timer generates a non-maskable interrupt (NMI). The vector number of NMI is 2, with the vector address set to the vector table's starting address + 8 bytes. This interrupt is prioritized over other interrupts and is unconditionally accepted by the S1C17 Core.
The operand imm5 specifies a vector number (0–31) in the vector table. In addition to this, the intl instruction has the operand imm3 to specify the interrupt level (0–7) to be set to the IL field in the PSR. The processor performs the same interrupt handling as that of the hardware interrupt. EPSON 6-10 S1C17704 TECHNICAL MANUAL...
The program execution sequence (whether it branches to the interrupt handler routine) after the CPU starts up depends on the clock status in HALT/SLEEP mode. See “C.1 Power Saving by Clock Control” in Appendix C for details. EPSON S1C17704 TECHNICAL MANUAL 6-11...
Sets the SPI and I C interrupt levels. The following describes each ITC register. These are all 16-bit registers. Note: When setting the registers, be sure to write a 0, and not a 1, for all “reserved bits.” EPSON 6-12 S1C17704 TECHNICAL MANUAL...
Page 70
The interrupt flag of the level triggered interrupt must be reset using the control register in the peripheral module. EPSON 6-14 S1C17704 TECHNICAL MANUAL...
0 Disable D[15:1] Reserved ITEN: ITC Enable Bit Enables the ITC to control interrupt generation. 1 (R/W): Enable 0 (R/W): Disable (default) Before the ITC can be used, this bit must be set to 1. EPSON 6-16 S1C17704 TECHNICAL MANUAL...
0x0 R/W D[15:13] Reserved EITG1: P1 Port Interrupt Trigger Mode Select Bit Selects the trigger mode of the P1 port interrupt. Set this bit 1 in the S1C17704. 1 (R/W): Level trigger mode 0 (R/W): Pulse trigger mode (default) In pulse trigger mode, the ITC samples interrupt signals at the rising edge of the system clock. When a high pulse is sampled, the ITC sets the interrupt flag (EIFTx) to 1 and stops sampling of that interrupt signal.
0x0 R/W D[15:13] Reserved EITG3: Clock Timer Interrupt Trigger Mode Select Bit Selects the trigger mode of the clock timer interrupt. Set this bit 1 in the S1C17704. 1 (R/W): Level trigger mode 0 (R/W): Pulse trigger mode (default) See the description of EITG1 (D12) in the ITC_ELV0 register (0x4306).
D[7:5] Reserved EITG4: 8-bit OSC1 Timer Interrupt Trigger Mode Select Bit Selects the trigger mode of the 8-bit OSC1 timer interrupt. Set this bit 1 in the S1C17704. 1 (R/W): Level trigger mode 0 (R/W): Pulse trigger mode (default) See the description of EITG1 (D12) in the ITC_ELV0 register (0x4306).
D[15:13] Reserved EITG7: PWM & Capture Timer Interrupt Trigger Mode Select Bit Selects the trigger mode of the PWM & capture timer interrupt. Set this bit 1 in the S1C17704. 1 (R/W): Level trigger mode 0 (R/W): Pulse trigger mode (default) See the description of EITG1 (D12) in the ITC_ELV0 register (0x4306).
ITC changes the vector number and interrupt level to those of the new cause of interrupt. The first interrupt request is left pending. D[7:3] Reserved D[2:0] IILV0[2:0]: 8-bit Timer Interrupt Level Bits Sets the interrupt level (0 to 7) of the 8-bit timer interrupt. (Default: 0) See the description of IILV1[2:0] (D[10:8]). EPSON S1C17704 TECHNICAL MANUAL 6-21...
Reserved D[2:0] IILV2[2:0]: 16-bit Timer Ch.1 Interrupt Level Bits Sets the interrupt level (0 to 7) of the 16-bit timer Ch.1 interrupt. (Default: 0) See the description of IILV1[2:0] (D[10:8]) in the ITC_ILV0 register (0x430e). EPSON 6-22 S1C17704 TECHNICAL MANUAL...
See the description of IILV1[2:0] (D[10:8]) in the ITC_ILV0 register (0x430e). D[7:3] Reserved D[2:0] IILV4[2:0]: UART Interrupt Level Bits Sets the interrupt level (0 to 7) of the UART interrupt. (Default: 0) See the description of IILV1[2:0] (D[10:8]) in the ITC_ILV0 register (0x430e). EPSON S1C17704 TECHNICAL MANUAL 6-23...
See the description of IILV1[2:0] (D[10:8]) in the ITC_ILV0 register (0x430e). D[7:3] Reserved D[2:0] IILV6[2:0]: SPI Interrupt Level Bits Sets the interrupt level (0 to 7) of the SPI interrupt. (Default: 0) See the description of IILV1[2:0] (D[10:8]) in the ITC_ILV0 register (0x430e). EPSON 6-24 S1C17704 TECHNICAL MANUAL...
• To prevent another interrupt from being generated for the same cause again after generation of an interrupt, be sure to reset the interrupt flag before enabling interrupts and setting the PSR again or executing the reti instruction. • The following S1C17704 interrupts use level trigger mode. - P0 port interrupt - P1 port interrupt...
Page 82
6 INTERRUPT CONTROLLER (ITC) THIS PAGE IS BLANK. EPSON 6-26 S1C17704 TECHNICAL MANUAL...
7.1 Configuration of OSC Module The S1C17704 has two built-in oscillators (OSC3 and OSC1). The OSC3 oscillator generates the main clock (Max. 8.2 MHz) for operating the S1C17 Core and peripheral circuits at high speed. The OSC1 oscillator generates the sub clock (Typ.
∗ OSC3EN: OSC3 Enable Bit in the Oscillation Control (OSC_CTL) Register (D0/0x5061) At initial reset, OSC3EN is set to 1 for enabling OSC3 oscillation. Furthermore, the OSC3 clock is selected as the system clock, so the S1C17 Core starts operating with the OSC3 clock. EPSON S1C17704 TECHNICAL MANUAL...
Page 85
Note: The oscillation start time varies depending on the resonator and externally attached parts. Set the stable oscillation wait time with a safety margin. Refer to the oscillation start time example described in Chapter 26, “Electrical Characteristics.” EPSON S1C17704 TECHNICAL MANUAL...
S1C17 Core is woken from SLEEP mode or when software turns the OSC1 oscillator circuit on. The OSC1 clock supply to the system is disabled for 256 OSC1 clock cycles after the OSC1 oscillator starts oscillating. EPSON S1C17704 TECHNICAL MANUAL...
Set the stable oscillation wait time with a safety margin. Refer to the oscillation start time example described in Chapter 26, “Electrical Characteristics.” • The OSC1 oscillation cannot be stopped before switching the system clock to OSC3. EPSON S1C17704 TECHNICAL MANUAL...
When LCKEN is set to 1, the clock generated with the above conditions is supplied to the LCD driver. If display on the LCD is not necessary, disable the clock supply to reduce current consumption. ∗ LCKEN: LCD Clock Enable Bit in the LCD Clock Setup (OSC_LCLK) Register (D0/0x5063) EPSON S1C17704 TECHNICAL MANUAL...
8-bit OSC1 timer. When the application does not need the 8-bit OSC1 timer to run, disable the clock supply to reduce current consumption. ∗ T8O1CE: T8OSC1 Clock Enable Bit in the T8OSC1 Clock Control (OSC_T8OSC1) Register (D0/0x5065) EPSON S1C17704 TECHNICAL MANUAL...
∗ FOUT3E: FOUT3 Output Enable Bit in the FOUT Control (OSC_FOUT) Register (D1/0x5064) FOUT3E FOUT3 output (P30) Figure 7.7.2 FOUT3 Output Note: The FOUT3 signal is generated asynchronously with writing to FOUT3E, therefore, a hazard will occur when the output is enabled or disabled. EPSON S1C17704 TECHNICAL MANUAL...
Page 91
∗ FOUT1E: FOUT1 Output Enable Bit in the FOUT Control (OSC_FOUT) Register (D0/0x5064) FOUT1E FOUT1 output (P13) Figure 7.7.3 FOUT1 Output Note: The FOUT1 signal is generated asynchronously with writing to FOUT1E, therefore, a hazard will occur when the output is enabled or disabled. EPSON S1C17704 TECHNICAL MANUAL...
Notes: • Enable the filter for the RESET input under normal circumstances. • Although the S1C17704 has no external NMI input pin, the NMI request signal of the watchdog timer pass through the filter.
Sets up the 8-bit OSC1 timer clock. The following describes each OSC module control register. These are all 8-bit registers. Note: When setting the registers, be sure to write a 0, and not a 1, for all “reserved bits.” EPSON S1C17704 TECHNICAL MANUAL 7-11...
OSC3 oscillation to reduce current consumption. Note: When the system clock is switched from OSC3 to OSC1 immediately after the OSC1 oscillator starts oscillating, the system clock is halted until the OSC1 clock is activated (256 OSC1 clock-cycle period). EPSON 7-12 S1C17704 TECHNICAL MANUAL...
OSC1 clock-cycle period when the OSC1 oscillation is started by setting OSC1EN from 0 to 1. OSC3EN: OSC3 Enable Bit Enables/disables the OSC3 oscillator. 1 (R/W): Enable (On) (default) 0 (R/W): Disable (Off) Note: The OSC3 oscillator cannot be disabled when OSC3 is used as the system clock. EPSON S1C17704 TECHNICAL MANUAL 7-13...
S1C17 Core. Pulses that have a width of less than 16 cycles will be rejected as noise. Note: Although the S1C17704 has no external NMI input pin, the NMI request signal of the watchdog timer passes through the filter.
LCKEN is set to 0 and the clock supply is disabled by default. By setting LCKEN to 1, the clock configured using the control bits above is supplied to the LCD driver. If an LCD display is unnecessary, disable the clock supply to reduce current consumption. EPSON S1C17704 TECHNICAL MANUAL 7-15...
FOUT1 output, write 1 to the P13MUX bit (D3/P1_PMUX register) to switch the pin function. ∗ P13MUX: P13 Port Function Select Bit in the P1 Port Function Select (P1_PMUX) Register (D3/0x52a1) EPSON 7-16 S1C17704 TECHNICAL MANUAL...
T8O1CE is set to 0 and the clock supply is disabled by default. By setting T8O1CE to 1, the clock configured using the control bits above is supplied to the 8-bit OSC1 timer. If 8-bit OSC1 timer function is unnecessary, disable the clock supply to reduce current consumption. EPSON S1C17704 TECHNICAL MANUAL 7-17...
• The OSC1 oscillator cannot be disabled when OSC1 is used as the system clock. • Since the FOUT3/FOUT1 signals are generated asynchronously with writing to FOUT3E/FOUT1E, a hazard may be generated when the signal is turned on or off. EPSON 7-18 S1C17704 TECHNICAL MANUAL...
Figure 8.1.1 Structure of the CLG Module Current consumption can be reduced by controlling the clocks according to the processing requirements as well as by using the standby mode. For methods to reduce current consumption, see Appendix C, “Power Saving.” EPSON S1C17704 TECHNICAL MANUAL...
Executing the slp instruction disables system clock supply to the CLG, therefore it also stops CCLK. When SLEEP mode is canceled by an external interrupt, supplying CCLK is resumed as well as the system clock supply to the CLG. For control of the system clock, see Chapter 7, “Oscillator (OSC).” EPSON S1C17704 TECHNICAL MANUAL...
The LCD driver operates with the OSC1 clock or a divided OSC3 clock. Although the control registers cannot be accessed for read and write when the PCLK supply is disabled, the LCD driver keeps refreshing the display. Also PCLK is not necessary for accessing the display memory. EPSON S1C17704 TECHNICAL MANUAL...
Configures the CCLK division ratio. The following describes each CLG module control register. These are all 8-bit registers. Note: When setting the registers, be sure to write a 0, and not a 1, for all “reserved bits.” EPSON S1C17704 TECHNICAL MANUAL...
Therefore, PCLK is not required after the control registers are set once and the module starts operating. • Clock timer • Stopwatch timer • Watchdog timer • 8-bit OSC1 timer • LCD driver Note: Be sure to avoid setting PCKEN[1:0] to 0x2 or 0x1, as it stops some peripheral modules. EPSON S1C17704 TECHNICAL MANUAL...
Selects a gear ratio to decelerate the system clock. This determines the rate of the CCLK clock for driving the S1C17 Core. Drive the S1C17 Core with the slowest clock possible to reduce current consumption. Table 8.4.3 Selecting CCLK Gear Ratio CCLKGR[1:0] Gear ratio (Default: 0x0) EPSON S1C17704 TECHNICAL MANUAL...
- 8-bit OSC1 timer - LCD driver • Be sure to avoid setting PCKEN[1:0] (D[1:0]/CLG_PCLK register) to 0x2 or 0x1, as it stops some peripheral modules. ∗ PCKEN[1:0]: PCLK Enable Bits in the PCLK Control (CLG_PCLK) Register (D[1:0]/0x5080) EPSON S1C17704 TECHNICAL MANUAL...
Page 108
8 CLOCK GENERATOR (CLG) THIS PAGE IS BLANK. EPSON S1C17704 TECHNICAL MANUAL...
9.1 Configuration of the Prescaler The S1C17704 incorporates a prescaler for generating the source clock of the timers and other peripheral modules. The prescaler divides the PCLK clock, which is supplied from the clock generator, by 1 to 16K to generate 15 clocks with different frequencies.
1 (R/W): Run 0 (R/W): Stop (default) Write 1 to PRUN to run the prescaler and write 0 to stop the prescaler. When the timer and interface modules are idle, stop the prescaler to reduce current consumption. EPSON S1C17704 TECHNICAL MANUAL...
10.1 Structure of I/O Port The S1C17704 contains 28 I/O ports (P0[7:0], P1[7:0], P2[7:0], and P3[3:0]) that can be directed for input or output with software. Although the I/O pins, except for some I/O ports, are shared with internal peripheral modules, the pins can be used as general-purpose input/output ports unless they are used for the peripheral modules.
For the pin function other than the I/O port, see the descriptions for the peripheral module indicated in ( ). The subsequent sections explain the port functions assuming that the pin has been set for the general-purpose I/O port. EPSON 10-2 S1C17704 TECHNICAL MANUAL...
∗ P2OUT[7:0]: P2[7:0] Port Output Data Bits in the P2 Port Output Data (P2_OUT) Register (D[7:0]/0x5221) ∗ P3OUT[3:0]: P3[3:0] Port Output Data Bits in the P3 Port Output Data (P3_OUT) Register (D[3:0]/0x5231) Even in the input mode, data can be written to PxOUT[7:0] without affecting the pin status. EPSON S1C17704 TECHNICAL MANUAL 10-3...
10 I/O PORTS (P) 10.4 Pull-Up Control The S1C17704 I/O ports have a built-in pull-up resistor and whether it is used or not can be selected using PxPU[7:0] (Px_PU register) for each bit individually. ∗ P0PU[7:0]: P0[7:0] Port Pull-up Enable Bits in the P0 Port Pull-up Control (P0_PU) Register (D[7:0]/0x5203) ∗...
When PxSM[7:0] is set to 1 (default), the port is configured with a CMOS Schmitt level input interface. When the bit is set to 0, the port is configured with a CMOS level input interface. EPSON S1C17704 TECHNICAL MANUAL 10-5...
This causes the input interrupt to malfunction, therefore setup the input signal so that the rise/fall time is 25 ns or less. EPSON 10-6 S1C17704 TECHNICAL MANUAL...
When PxEDGE[7:0] is set to 1, an input interrupt of the corresponding port will be generated at the falling edge; when the bit is set to 0 (default), an interrupt will be generated at the rising edge. EPSON S1C17704 TECHNICAL MANUAL 10-7...
Page 120
• No other cause of interrupt having higher priority, such as NMI, has occurred. For details on these interrupt control registers, as well as the device operation when an interrupt has occurred, refer to Chapter 6, “Interrupt Controller (ITC).” EPSON 10-8 S1C17704 TECHNICAL MANUAL...
10 I/O PORTS (P) Interrupt vectors The following shows the vector numbers and vector addresses for the port interrupts: Table 10.7.2 Port Interrupt Vectors Port Vector number Vector address 4 (0x04) 0x8010 5 (0x05) 0x8014 EPSON S1C17704 TECHNICAL MANUAL 10-9...
Selects the P3 port function. The following describes each I/O port control register. These are all 8-bit registers. Note: When setting the registers, be sure to write a 0, and not a 1, for all “reserved bits.” EPSON 10-10 S1C17704 TECHNICAL MANUAL...
If the pin voltage is high, 1 is read out as input data; if the pin voltage is low, 0 is read out as input data. In the output mode, an indefinite value is read out. PxIN[7:0] are read only bits and write operation is ineffective. EPSON S1C17704 TECHNICAL MANUAL 10-11...
I/O port pin. If the data written to the port is 1, the port pin goes high; if the data is 0, the port pin goes low. Even in input mode, data can be written to the port data register. EPSON 10-12 S1C17704 TECHNICAL MANUAL...
When a bit is set to 1, the corresponding I/O port is directed for output; if it is set to 0, the I/O port is directed for input. When the pin is used for a peripheral module, the input/output direction depends on the peripheral function. EPSON S1C17704 TECHNICAL MANUAL 10-13...
This wait time should be the amount of time or more calculated by the following expression. × (C + load capacitance on the board) × 1.6 [seconds] Wait time = R : Pull-up resistance Max. value : Pin capacitance Max. value EPSON 10-14 S1C17704 TECHNICAL MANUAL...
The PxSM[7:0] bits are the Schmitt input control bits corresponding to the Px[7:0] ports respectively. When a bit is set to 1, the Schmitt trigger input buffer is enabled; if it is set to 0, the I/O port uses a CMOS level input buffer. EPSON S1C17704 TECHNICAL MANUAL 10-15...
The input level transition at the port pin whose interrupt has been disabled does not affect occurrence of the interrupt. In addition, it is necessary to set the P0 and P1 port interrupt enable bits in the ITC to interrupt enabled to actually generate an interrupt. EPSON 10-16 S1C17704 TECHNICAL MANUAL...
When a PxEDGE[7:0] bit is set to 1, an input interrupt of the corresponding port will be generated at the falling edge; when it is set to 0, an interrupt will be generated at the rising edge. EPSON S1C17704 TECHNICAL MANUAL 10-17...
PxIE[7:0] (Px_IMSK register). ∗ P0IE[7:0]: P0[7:0] Port Interrupt Enable Bits in the P0 Port Interrupt Mask (P0_IMSK) Register (D[7:0]/0x5205) ∗ P1IE[7:0]: P1[7:0] Port Interrupt Enable Bits in the P1 Port Interrupt Mask (P1_IMSK) Register (D[7:0]/0x5215) EPSON 10-18 S1C17704 TECHNICAL MANUAL...
This causes the input interrupt to malfunction, therefore setup the input signal so that the rise/fall time is 25 ns or less. EPSON S1C17704 TECHNICAL MANUAL 10-19...
• The P0 port key-entry reset function cannot be used for power-on reset as it must be enabled with software. • The P0 port key-entry reset function cannot be used in SLEEP mode. EPSON 10-20 S1C17704 TECHNICAL MANUAL...
The P04 and P05 I/O port pins are shared with a peripheral module. This register configures the pin functions. D[7:6] Reserved P05MUX: P05 Port Function Select Bit 1 (R/W): REMO (REMC) 0 (R/W): P05 port (default) P04MUX: P04 Port Function Select Bit 1 (R/W): REMI (REMC) 0 (R/W): P04 port (default) D[3:0] Reserved EPSON S1C17704 TECHNICAL MANUAL 10-21...
0 (R/W): P15 port (default) P14MUX: P14 Port Function Select Bit 1 (R/W): SDA (I2C) 0 (R/W): P14 port (default) P13MUX: P13 Port Function Select Bit 1 (R/W): FOUT1 (OSC) 0 (R/W): P13 port (default) D[2:0] Reserved EPSON 10-22 S1C17704 TECHNICAL MANUAL...
0 (R/W): P22 port (default) P21MUX: P21 Port Function Select Bit 1 (R/W): SDO (SPI) 0 (R/W): P21 port (default) P20MUX: P20 Port Function Select Bit 1 (R/W): SDI (SPI) 0 (R/W): P20 port (default) EPSON S1C17704 TECHNICAL MANUAL 10-23...
0 (R/W): DST2 (DBG) (default) P31MUX: P31 Port Function Select Bit 1 (R/W): P31 port 0 (R/W): DCLK (DBG) (default) P30MUX: P30 Port Function Select Bit 1 (R/W): FOUT3 (OSC) 0 (R/W): P30 port (default) EPSON 10-24 S1C17704 TECHNICAL MANUAL...
• The P0 port key-entry reset function cannot be used for power-on reset as it must be enabled with software. • The P0 port key-entry reset function cannot be used in SLEEP mode. EPSON S1C17704 TECHNICAL MANUAL 10-25...
Page 138
10 I/O PORTS (P) THIS PAGE IS BLANK. EPSON 10-26 S1C17704 TECHNICAL MANUAL...
11 16-bit Timers (T16) 11.1 Outline of the 16-bit Timers The S1C17704 is equipped with three channels of 16-bit timers (T16). The 16-bit timer includes a 16-bit presettable down counter and a 16-bit reload data register for setting the preset value.
Notes: • Before the 16-bit timer can start counting in internal clock mode, the prescaler must be run. • When setting the count clock, make sure the 16-bit timer counter is stopped. For controlling the prescaler, see Chapter 9, “Prescaler (PSC).” EPSON 11-2 S1C17704 TECHNICAL MANUAL...
The 16-bit timer set in this mode does not use the prescaler. If the prescaler clocks are not used in other peripheral modules, the prescaler can be stopped to reduce current consumption. (Note that the P0 port chattering filter uses a prescaler clock.) EPSON S1C17704 TECHNICAL MANUAL 11-3...
When an underflow occurs, the counter is preset with the reload data register value before the timer operation stops. Set the 16-bit timer in this mode when a certain waiting time must be generated or measuring pulse widths. EPSON S1C17704 TECHNICAL MANUAL 11-5...
To reset the 16-bit timer, write 1 to the PRESER bit (D1/T16_CTLx register). This initializes the counter by presetting the reload data register value. ∗ PRESER: Timer Reset Bit in the 16-bit Timer Ch.x Control (T16_CTLx) Register (D1/0x4226/0x4246/0x4266) EPSON S1C17704 TECHNICAL MANUAL 11-7...
In pulse width measurement mode, the timer performs counting only when PRUN = 1 and the external input signal is the specified active level. When the external input signal goes inactive, the 16-bit timer stops counting and maintains the count value until the next active pulse is input. (See Figure 11.2.3.1.) EPSON 11-8 S1C17704 TECHNICAL MANUAL...
The reload data register value to obtain a desired transfer rate is calculated by the expression below. clk_in TR = ———— - 1 bps × 2 clk_in TR = ———— - 1 bps × 2 clk_in: Count clock (prescaler output clock) frequency [Hz] Reload data (0–65535) bps: Transfer rate (bits/second) EPSON S1C17704 TECHNICAL MANUAL 11-9...
Sets the timer mode and starts/stops the timer. The following describes each 16-bit timer register. These are all 16-bit registers. Note: When setting the registers, be sure to write a 0, and not a 1, for all “reserved bits.” EPSON S1C17704 TECHNICAL MANUAL 11-11...
(and between underflows). This makes it possible to obtain a desired wait time, a periodical interrupt interval, or programmable transfer clock for the serial interface. EPSON S1C17704 TECHNICAL MANUAL 11-13...
0x4264: 16-bit Timer Ch.2 Counter Data Register (T16_TC2) D[15:0] TC[15:0]: 16-bit Timer Counter Data The counter data can be read from this register. (Default: 0xffff) This is a read-only register, so the writing operation is invalid. EPSON 11-14 S1C17704 TECHNICAL MANUAL...
This makes it possible to generate an interrupt when a pulse longer than a specified width is input or to measure the input pulse width. D[7:5] Reserved EPSON S1C17704 TECHNICAL MANUAL 11-15...
Page 154
The timer starts counting by writing 1 to PRUN and stops counting by writing 0. In the stop state, the counter data is retained until the timer is reset or placed in a run state. EPSON 11-16 S1C17704 TECHNICAL MANUAL...
11 16-BIT TIMERS (T16) 11.10 Precautions • Before the 16-bit timer can start counting, the prescaler must be run. • When setting the count clock or count mode, make sure the 16-bit timer is turned off. EPSON S1C17704 TECHNICAL MANUAL 11-17...
Page 156
11 16-BIT TIMERS (T16) THIS PAGE IS BLANK. EPSON 11-18 S1C17704 TECHNICAL MANUAL...
12 8-bit Timer (T8F) 12.1 Outline of the 8-bit Timer The S1C17704 incorporates one channel of 8-bit timer with fine mode. The 8-bit timer module includes an 8-bit presettable down counter and an 8-bit reload data register for setting the preset value.
Set the 8-bit timer in this mode when a certain waiting time must be generated. Note: When setting the count mode, make sure the 8-bit timer counter is stopped. EPSON 12-2 S1C17704 TECHNICAL MANUAL...
Notes: • Before the 8-bit timer can start counting, the prescaler must be run. • When setting the count clock, make sure the 8-bit timer counter is stopped. For controlling the prescaler, see Chapter 9, “Prescaler (PSC).” EPSON S1C17704 TECHNICAL MANUAL 12-3...
Count clock (prescaler output clock) frequency [Hz] T8F_TR: Reload data (0–255) Note: The UART divides the 8-bit timer output by 16 to generate the sampling clock. Make sure of the division ratio when setting a transfer rate. EPSON 12-4 S1C17704 TECHNICAL MANUAL...
To reset the 8-bit timer, write 1 to the PRESER bit (D1/T8F_CTL register). This initializes the counter by presetting the Reload Data Register value. ∗ PRESER: Timer Reset Bit in the 8-bit Timer Control (T8F_CTL) Register (D1/0x4206) EPSON S1C17704 TECHNICAL MANUAL 12-5...
Underflow signal (corrected) Delayed Output clock (not corrected) Output clock (corrected) Figure 12.8.1 Delay Cycle Insertion in Fine Mode At initial reset, TFMD[3:0] is set to 0x0. No delay will be inserted in this setting. EPSON 12-8 S1C17704 TECHNICAL MANUAL...
For details on these interrupt control registers, as well as the device operation when an interrupt has occurred, see Chapter 6, “Interrupt Controller (ITC).” Interrupt vector The following shows the vector number and vector address for the timer interrupt: Vector number: 12 (0x0c) Vector address: 0x8030 EPSON S1C17704 TECHNICAL MANUAL 12-9...
Sets the timer mode and starts/stops the timer. The following describes each 8-bit timer register. These are all 16-bit registers. Note: When setting the registers, be sure to write a 0, and not a 1, for all “reserved bits.” EPSON 12-10 S1C17704 TECHNICAL MANUAL...
(and between underflows). This makes it possible to obtain a desired wait time, a periodical interrupt interval, or programmable transfer clock for the serial interface. EPSON 12-12 S1C17704 TECHNICAL MANUAL...
TC7 = MSB (T8F_TC) TC0 = LSB D[15:8] Reserved D[7:0] TC[7:0]: 8-bit Timer Counter Data The counter data can be read from this register. (Default: 0xff) This is a read-only register, so the writing operation is invalid. EPSON S1C17704 TECHNICAL MANUAL 12-13...
– D: Indicates that a delay is inserted. Count clock Underflow signal (not corrected) Underflow signal (corrected) Delayed Output clock (not corrected) Output clock (corrected) Figure 12.10.1 Delay Cycle Inserted in Fine Mode D[7:5] Reserved EPSON 12-14 S1C17704 TECHNICAL MANUAL...
Page 171
The timer starts counting by writing 1 to PRUN and stops counting by writing 0. In the stop state, the counter data is retained until the timer is reset or placed in a run state. EPSON S1C17704 TECHNICAL MANUAL 12-15...
12 8-BIT TIMER (T8F) 12.11 Precautions • Before the 8-bit timer can start counting, the prescaler must be run. • When setting the count clock or count mode, make sure the 8-bit timer is turned off. EPSON 12-16 S1C17704 TECHNICAL MANUAL...
The PWM & capture timer counts up at the rising edge of the input signal. The PWM & capture timer set in this mode does not use the prescaler. If the prescaler clocks are not used in other peripheral modules, the prescaler can be stopped to reduce current consumption. EPSON 13-2 S1C17704 TECHNICAL MANUAL...
After the counter starts counting, it will be reset by the hardware when the counter reaches compare data B. Furthermore, any data can be set to the counter by writing it to T16ETC[15:0] (D[15:0]/T16E_TC register). ∗ T16ETC[15:0]: Counter Data in the PWM Timer Counter Data (T16E_TC) Register (D[15:0]/0x5304) EPSON S1C17704 TECHNICAL MANUAL 13-3...
INITOL and INVOUT. The output pin holds this level until the output level changes due to the counter value after the timer output is enabled. Table 13.6.1 Initial Output Level INITOL INVOUT Initial output level High High EPSON 13-6 S1C17704 TECHNICAL MANUAL...
Page 179
When the counter becomes equal to the compare data B set in the T16E_CB register (0x5302), the counter is reset and the output pin goes high. At the same time a cause of compare B interrupt occurs. EPSON S1C17704 TECHNICAL MANUAL 13-7...
Page 180
(2) When compare data are set as A > B (or set as A > B × 2 in fine mode), the compare B match signal will be generated but no compare A match signal will be generated. In this case, the timer output signal is fixed at the low (or high when INVOUT = 1). EPSON 13-8 S1C17704 TECHNICAL MANUAL...
ITC, to clear the cause of interrupt. Note: To avoid occurrence of unnecessary interrupts, be sure to reset the CAIF or CBIF flag before the compare A match or compare B match interrupt is enabled using CAIE or CBIE. EPSON S1C17704 TECHNICAL MANUAL 13-9...
Page 182
(this also resets the interrupt flag in the ITC). Interrupt vector The following shows the vector number and vector address for the PWM & capture timer interrupt: Vector number: 11 (0x0b) Vector address: 0x802c EPSON 13-10 S1C17704 TECHNICAL MANUAL...
Indicates/resets interrupt occurrence status. The following describes each PWM & capture timer register. These are all 16-bit registers. Note: When setting the registers, be sure to write a 0, and not a 1, for all “reserved bits.” EPSON S1C17704 TECHNICAL MANUAL 13-11...
The data set in this register is compared with the counter data. When the contents match, a cause of compare A interrupt is generated and the output signal rises (INVOUT (D4/T16E_CTL register) = 0) or falls (INVOUT = 1). This does not affect the counter value and count-up operation. EPSON 13-12 S1C17704 TECHNICAL MANUAL...
The data set in this register is compared with the counter data. When the contents match, a cause of compare B interrupt is generated and the output signal rises (INVOUT (D4/T16E_CTL register) = 0) or falls (INVOUT = 1). Furthermore, the counter is reset to 0. EPSON S1C17704 TECHNICAL MANUAL 13-13...
T16ETC15 = MSB Register T16ETC0 = LSB (T16E_TC) D[15:0] T16ETC[15:0]: Counter Data The counter data can be read from this register. (Default: 0x0) Furthermore, data can be set to the counter by writing it to this register. EPSON 13-14 S1C17704 TECHNICAL MANUAL...
By writing 1 to INVOUT, an active-low signal (off level = high) is generated for the TOUT output. When INVOUT is set to 0, an active-high signal (off level = low) is generated. Writing 1 to this bit inverts the initial output level set using INITOL (D8) as well. EPSON S1C17704 TECHNICAL MANUAL 13-15...
Page 188
The PWM & capture timer starts counting up by writing 1 to T16ERUN and stops by writing 0. In Stop state, the counter data is retained until the timer is reset or placed in a Run state. By changing states from Stop to Run, the timer can restart counting beginning at the retained count. EPSON 13-16 S1C17704 TECHNICAL MANUAL...
Setting CAIE to 1 enables the compare A interrupt; setting to 0 disables the interrupt. In addition, it is necessary to set the PWM & capture timer interrupt enable bits in the ITC to interrupt enabled to actually generate an interrupt. EPSON 13-18 S1C17704 TECHNICAL MANUAL...
The CAIF and CBIF flags are reset by writing 1. Note: To avoid occurrence of unnecessary interrupts, be sure to reset the CAIF or CBIF flag before the compare A match or compare B match interrupt is enabled using CAIE (D0/T16E_IMSK) or CBIE (D1/T16E_IMSK). EPSON S1C17704 TECHNICAL MANUAL 13-19...
• To avoid occurrence of unnecessary interrupts, be sure to reset CAIF (D0/T16E_IFLG register) or CBIF (D1/ T16E_IFLG register) flag before the compare A match or compare B match interrupt is enabled using CAIE (D0/ T16E_IMSK register) or CBIE (D1/T16E_IMSK register). EPSON 13-20 S1C17704 TECHNICAL MANUAL...
14 8-bit OSC1 Timer (T8OSC1) 14.1 Outline of the 8-bit OSC1 Timer The S1C17704 incorporates one channel of 8-bit OSC1 timer that uses OSC1 as its clock source. Figure 14.1.1 shows the structure of the 8-bit OSC1 timer. 8-bit OSC1 Timer...
Set the 8-bit OSC1 timer in this mode when a certain waiting time must be generated. Note: When setting the count mode, make sure the 8-bit OSC1 timer counter is stopped. EPSON 14-2 S1C17704 TECHNICAL MANUAL...
∗ T8O1CE: T8OSC1 Clock Enable Bit in the T8OSC1 Clock Control (OSC_T8OSC1) Register (D0/0x5065) Note: When setting the count clock, make sure the 8-bit OSC1 timer counter is stopped. For control of the clock, see Chapter 7, “Oscillator (OSC).” EPSON S1C17704 TECHNICAL MANUAL 14-3...
∗ T8ORST: Timer Reset Bit in the 8-bit OSC1 Timer Control (T8OSC1_CTL) Register (D4/0x50c0) Normally, reset the counter before starting count-up by writing 1 to this control bit. After the counter starts counting, it will be reset by the hardware when the counter reaches compare data. EPSON 14-4 S1C17704 TECHNICAL MANUAL...
The compare match period is calculated by the expression below. CMP + 1 Compare match period = ————— [s] clk_in clk_in Compare match cycle = ————— [Hz] CMP + 1 CMP: Compare data (T8OSC1_CMP register value) clk_in: 8-bit OSC1 timer count clock frequency EPSON S1C17704 TECHNICAL MANUAL 14-5...
EIEN4 to 0. EIFT4 is always set to 1 by the interrupt signal sent from the T8OSC1 module, regardless of how EIEN4 is set (even when set to 0). EILV4[2:0] sets the interrupt level (0 to 7) of the 8-bit OSC1 timer interrupt. EPSON S1C17704 TECHNICAL MANUAL 14-7...
Page 200
(this also resets the interrupt flag in the ITC). Interrupt vector The following shows the vector number and vector address for the 8-bit OSC1 timer interrupt: Vector number: 8 (0x08) Vector address: 0x8020 EPSON 14-8 S1C17704 TECHNICAL MANUAL...
Indicates/resets interrupt occurrence status. The following describes each 8-bit OSC1 timer register. These are all 8-bit registers. Note: When setting the registers, be sure to write a 0, and not a 1, for all “reserved bits.” EPSON S1C17704 TECHNICAL MANUAL 14-9...
The timer starts counting by writing 1 to T8ORUN and stops counting by writing 0. In the stop state, the counter data is retained until the timer is reset or placed in a run state. EPSON 14-10 S1C17704 TECHNICAL MANUAL...
The counter value should be obtained by one of the following procedures: • Read the counter value after stopping the counter. • Read the counter value twice to determine that both read results are the same and that the read value is significant. EPSON S1C17704 TECHNICAL MANUAL 14-11...
Sets the compare data for the 8-bit OSC1 timer. (Default: 0x0) The data set in this register is compared with the counter data. When the contents match, a cause of compare interrupt is generated. At the same time, the counter is reset to 0. EPSON 14-12 S1C17704 TECHNICAL MANUAL...
Setting T8OIE to 1 enables the 8-bit OSC1 timer to request interrupts to the ITC; setting to 0 disables the interrupt. In addition, it is necessary to set the 8-bit OSC1 timer interrupt enable bits in the ITC to interrupt enabled to actually generate an interrupt. EPSON S1C17704 TECHNICAL MANUAL 14-13...
(this also resets the interrupt flag in the ITC). The T8OIF flag is reset by writing 1. Note: To avoid occurrence of unnecessary interrupts, be sure to reset the T8OIF flag before the compare match interrupt is enabled using T8OIE (D0/T8OSC1_IMSK register). EPSON 14-14 S1C17704 TECHNICAL MANUAL...
To obtain the counter value, read the counter data register after stopping the counter. Or read the counter value twice to determine that both read results are the same and that the read value is significant. EPSON S1C17704 TECHNICAL MANUAL 14-15...
Page 208
14 8-BIT OSC1 TIMER (T8OSC1) THIS PAGE IS BLANK. EPSON 14-16 S1C17704 TECHNICAL MANUAL...
15.1 Outline of the Clock Timer The S1C17704 incorporates one channel of clock timer that uses OSC1 as its clock source. The clock timer contains an 8-bit binary counter that operates with a divided OSC1 clock (256 Hz signal). The counter data bits (128 to 1 Hz) can be read with software.
The OSC module does not provide a control bit for the 256 Hz clock. The 256 Hz clock is always supplied to the clock timer when the OSC1 oscillator is on. For control of the OSC1 oscillator, see Chapter 7, “Oscillator (OSC).” EPSON 15-2 S1C17704 TECHNICAL MANUAL...
To reset the clock timer, write 1 to the CTRST bit (D4/CT_CTL register). This initializes the counter to 0. ∗ CTRST: Clock Timer Reset Bit in the Clock Timer Control (CT_CTL) Register (D4/0x5000) The counter is also initialized to 0 at initial reset. EPSON S1C17704 TECHNICAL MANUAL 15-3...
∗ EILV3[2:0]: CT Interrupt Level Bits in the External Interrupt Level Setup (ITC_ELV1) Register 1 (D[10:8]/0x4308) Interrupt trigger mode select bit in the ITC (fixed at 1) ∗ EITG3: CT Interrupt Trigger Mode Select Bit in the External Interrupt Level Setup (ITC_ELV1) Register 1 (D12/0x4308) EPSON S1C17704 TECHNICAL MANUAL 15-5...
Page 214
2. After an interrupt occurs, reset the CTIF∗ interrupt flag of the CT module in the interrupt handler routine (this also resets the interrupt flag in the ITC). Interrupt vector The following shows the vector number and vector address for the clock timer interrupt: Vector number: 7 (0x07) Vector address: 0x801c EPSON 15-6 S1C17704 TECHNICAL MANUAL...
Indicates/resets interrupt occurrence status. The following describes each clock timer register. These are all 8-bit registers. Note: When setting the registers, be sure to write a 0, and not a 1, for all “reserved bits.” EPSON S1C17704 TECHNICAL MANUAL 15-7...
0 (R/W): Stop (default) The clock timer starts counting by writing 1 to CTRUN and stops by writing 0. In Stop state, the counter data is retained until the timer is reset or placed in a Run state. EPSON 15-8 S1C17704 TECHNICAL MANUAL...
The counter value should be obtained by one of the following procedures: • Read the counter value after stopping the counter. • Read the counter value twice to determine that both read results are the same and that the read value is significant. EPSON S1C17704 TECHNICAL MANUAL 15-9...
No cause of interrupt has occurred (default) 1 (W): Flag is reset 0 (W): Has no effect CTIF1 is set to 1 at the falling edge of the 1 Hz signal only when CTIE1 (D0/CT_IMSK register) has been set to 1. EPSON S1C17704 TECHNICAL MANUAL 15-11...
To obtain the counter value, read the counter register after stopping the counter. Or read the counter value twice to determine that both read results are the same and that the read value is significant. EPSON 15-12 S1C17704 TECHNICAL MANUAL...
16.1 Outline of the Stopwatch Timer The S1C17704 incorporates a stopwatch timer that counts 1/100 and 1/10 seconds. The stopwatch timer consists of two 4-bit BCD counters (for 1/100 and 1/10 seconds) that operate with a divided OSC1 clock (256 Hz signal). The counter data can be read with software.
The 1/10-second counter counts the approximate 10 Hz signal output by the 1/100-second counter in 4:6 ratios to generate a 1 Hz signal. The counter counts up in 25/256-second and 26/256-second intervals, therefore the count cycle is an approximate 1/10 seconds. EPSON 16-2 S1C17704 TECHNICAL MANUAL...
The OSC module does not provide a control bit for the 256 Hz clock. The 256 Hz clock is always supplied to the stopwatch timer when the OSC1 oscillator is on. For control of the OSC1 oscillator, see Chapter 7, “Oscillator (OSC).” EPSON S1C17704 TECHNICAL MANUAL 16-3...
To reset the stopwatch timer, write 1 to the SWTRST bit (D4/SWT_CTL register). This initializes the counter to 0. ∗ SWTRST: Stopwatch Timer Reset Bit in the Stopwatch Timer Control (SWT_CTL) Register (D4/0x5020) The counter is also initialized to 0 at initial reset. EPSON 16-4 S1C17704 TECHNICAL MANUAL...
∗ EILV2[2:0]: SWT Interrupt Level Bits in the External Interrupt Level Setup (ITC_ELV1) Register 1 (D[2:0]/0x4308) Interrupt trigger mode select bit in the ITC (fixed at 1) ∗ EITG2: SWT Interrupt Trigger Mode Select Bit in the External Interrupt Level Setup (ITC_ELV1) Register 1 (D4/0x4308) EPSON 16-6 S1C17704 TECHNICAL MANUAL...
Page 227
2. After an interrupt occurs, reset the SIF∗ interrupt flag of the SWT module in the interrupt handler routine (this also resets the interrupt flag in the ITC). Interrupt vector The following shows the vector number and vector address for the stopwatch timer interrupt: Vector number: 6 (0x06) Vector address: 0x8018 EPSON S1C17704 TECHNICAL MANUAL 16-7...
Indicates/resets interrupt occurrence status. The following describes each stopwatch timer register. These are all 8-bit registers. Note: When setting the registers, be sure to write a 0, and not a 1, for all “reserved bits.” EPSON 16-8 S1C17704 TECHNICAL MANUAL...
0 (R/W): Stop (default) The stopwatch timer starts counting by writing 1 to SWTRUN and stops by writing 0. In Stop state, the counter data is retained until the timer is reset or placed in a Run state. EPSON S1C17704 TECHNICAL MANUAL 16-9...
The counter value should be obtained by one of the following procedures: • Read the counter value after stopping the counter. • Read the counter value twice to determine that both read results are the same and that the read value is significant. EPSON 16-10 S1C17704 TECHNICAL MANUAL...
No cause of interrupt has occurred (default) 1 (W): Flag is reset 0 (W): Has no effect SIF100 is set to 1 at the falling edge of the 100 Hz signal only when SIE100 (D0/SWT_IMSK register) has been set to 1. EPSON 16-12 S1C17704 TECHNICAL MANUAL...
To obtain the counter value, read the counter register after stopping the counter. Or read the counter value twice to determine that both read results are the same and that the read value is significant. EPSON S1C17704 TECHNICAL MANUAL 16-13...
Page 234
16 STOPWATCH TIMER (SWT) THIS PAGE IS BLANK. EPSON 16-14 S1C17704 TECHNICAL MANUAL...
17 Watchdog Timer (WDT) 17.1 Outline of the Watchdog Timer The S1C17704 is equipped with a watchdog timer driven by OSC1 as the clock source. If the watchdog timer is not reset for more than 131072/f seconds (4 seconds when f = 32.768 kHz), an NMI or a reset signal (selectable...
The OSC module does not provide a control bit for the 256 Hz clock. The 256 Hz clock is always supplied to the watchdog timer when the OSC1 oscillator is on. For control of the OSC1 oscillator, see Chapter 7, “Oscillator (OSC).” EPSON 17-2 S1C17704 TECHNICAL MANUAL...
To prevent an unnecessary NMI or reset signal from being generated after canceling SLEEP mode, be sure to reset the watchdog timer before executing the slp instruction. Moreover, stop the watchdog timer by setting WDTRUN[3:0] as required. EPSON S1C17704 TECHNICAL MANUAL 17-3...
Sets the timer mode and indicates NMI status. The following describes each watchdog timer register. These are all 8-bit registers. Note: When setting the registers, be sure to write a 0, and not a 1, for all “reserved bits.” EPSON 17-4 S1C17704 TECHNICAL MANUAL...
WDTRUN[3:0]: Watchdog Timer Run/Stop Control Bits Starts/stops the watchdog timer. Other than 0b1010 (R/W): Run 0b1010 (R/W): Stop (default) Reset the watchdog timer before starting, thus preventing the generation of unnecessary NMI or reset signals. EPSON S1C17704 TECHNICAL MANUAL 17-5...
This bit is also set due to a counter overflow even if reset output is selected, however, the bit is cleared at initial reset and cannot be checked if it has been set to 1. EPSON 17-6 S1C17704 TECHNICAL MANUAL...
• When the watchdog timer is used, it must be reset within 131072/f second cycle (4 seconds when f OSC1 OSC1 32.768 kHz). • Reset the watchdog timer before starting, thus preventing the generation of unnecessary NMI or reset signals. EPSON S1C17704 TECHNICAL MANUAL 17-7...
Page 242
17 WATCHDOG TIMER (WDT) THIS PAGE IS BLANK. EPSON 17-8 S1C17704 TECHNICAL MANUAL...
18.1 Outline of the UART The S1C17704 equipped with one channel of UART. The UART performs asynchronous data transfer from/to an external serial device in a 150 to 115200 bps transfer rate. The UART contains two-byte receive data buffer and one-byte transmit data buffer allowing full-duplex communication.
P25 → SCLK (required only when an external clock is used) ∗ P25MUX: P25 Port Function Select Bit in the P2 Port Function Select (P2_PMUX) Register (D5/0x52a2) For details on switching pin function, see Section 10.2, “Selecting I/O Pin Functions (Port MUX).” EPSON 18-2 S1C17704 TECHNICAL MANUAL...
Make sure of the division ratio when setting a transfer rate. • The frequency of the external clock input from the SCLK pin must be half of PCLK or lower and the clock duty ratio must be 50%. EPSON S1C17704 TECHNICAL MANUAL 18-3...
S1 D0 D1 D2 D3 D4 D5 D6 D7 P S2 S1 D0 D1 D7 P S2 S1 D0 D1 D7 P TDBE TRBS Interrupt S1: Start bit, S2: Stop bit, P: Parity bit, Wr: Data write to transmit data buffer Figure 18.5.1 Data Transmit Timing Chart EPSON S1C17704 TECHNICAL MANUAL 18-5...
Page 248
∗ RBFI: Receive Buffer Full Interrupt Condition Setup Bit in the UART Control (UART_CTL) Register (D1/0x4104) In addition to the flags above, three receive error flags are provided. Refer to Section 18.6 for these flags and details of receive errors. EPSON 18-6 S1C17704 TECHNICAL MANUAL...
Page 249
When the RXEN bit is set to 0, the transmit and receive data buffers are placed in empty status (data is cleared if any remains). Furthermore, the data being transferred cannot be guaranteed if RXEN is set to 0 during transmitting/receiving. EPSON S1C17704 TECHNICAL MANUAL 18-7...
When an overrun error occurs, the overrun error flag OER (D4/UART_ST register) is set to 1. Even when this error occurs, the receive operation is continued. The OER flag (D4/UART_ST register) is reset to 0 by writing 1. ∗ OER: Overrun Error Flag in the UART Status (UART_ST) Register (D4/0x4100) EPSON 18-8 S1C17704 TECHNICAL MANUAL...
The UART interrupt handler routine should read the RDRY and RD2B flags to check if the interrupt has occurred due to a receive buffer full or another cause. When RDRY or RD2B = 1, the UART interrupt handler routine can read the received data from the receive data buffer. EPSON S1C17704 TECHNICAL MANUAL 18-9...
Page 252
For details on these interrupt control registers, as well as the device operation when an interrupt has occurred, see Chapter 6, “Interrupt Controller (ITC).” Interrupt vector The following shows the vector number and vector address for the UART interrupt: Vector number: 16 (0x10) Vector address: 0x8040 EPSON 18-10 S1C17704 TECHNICAL MANUAL...
To use the IrDA interface function, set the IRMD bit (D0/UART_EXP register) to 1. This enables the RZI modulator/demodulator. ∗ IRMD: IrDA Mode Select Bit in the UART Expansion (UART_EXP) Register (D0/0x4105) Note: This setting must be performed before setting other UART conditions. EPSON S1C17704 TECHNICAL MANUAL 18-11...
Page 254
The control method to transmit/receive data in IrDA mode is the same as that of the normal interface. See previous sections for details on how to set and control the data formats, data transfers, and interrupts. EPSON 18-12 S1C17704 TECHNICAL MANUAL...
UART Expansion Register Sets IrDA mode. The following describes each UART register. These are all 8-bit registers. Note: When setting the registers, be sure to write a 0, and not a 1, for all “reserved bits.” EPSON S1C17704 TECHNICAL MANUAL 18-13...
Second entry is empty (default) RD2B is set to 1 when the second data is loaded to the receive data buffer, and is reset to 0 when the first data is read out from the receive data buffer. EPSON 18-14 S1C17704 TECHNICAL MANUAL...
Page 257
0 (R): Not empty TDBE is reset to 0 when transmit data is written to the transmit data buffer and set to 1 when the transmit data in the buffer is transferred to the shift register. EPSON S1C17704 TECHNICAL MANUAL 18-15...
The serial-converted data is output from the SOUT pin beginning with the LSB, in which the bits set to 1 are output as high-level signals and those set to 0 output as low-level signals. This register can be read as well as written. EPSON 18-16 S1C17704 TECHNICAL MANUAL...
1s and the low-level signals changed to 0s. The resulting data is stored in the receive data buffer. This register is a read-only register, so no data can be written to it. (Default: 0x0) EPSON S1C17704 TECHNICAL MANUAL 18-17...
This bit is used to select the clock source between the internal clock (8-bit timer output clock) and an external clock (input from the SCLK pin). An external clock is selected by writing 1 to this bit, and an internal clock is selected by writing 0. EPSON 18-18 S1C17704 TECHNICAL MANUAL...
Before the UART can transmit/receive data, RXEN must be set to 1. When RXEN is set to 0, data transmission/reception is disabled. Always make sure RXEN = 0 before setting the transfer conditions. Writing 0 to RXEN also clears the transmit/receive data buffers. EPSON S1C17704 TECHNICAL MANUAL 18-19...
Turns the IrDA interface function on and off. 1 (R/W): On 0 (R/W): Off (default) Set this bit to 1 when using the IrDA interface. When set to 0, the module functions as a standard UART without IrDA. EPSON 18-20 S1C17704 TECHNICAL MANUAL...
Select an appropriate prescaler output clock as the IrDA receive detection clock so that it will be able to detect a minimum 1.41 µs width of an input pulse. EPSON S1C17704 TECHNICAL MANUAL 18-21...
Page 264
18 UART THIS PAGE IS BLANK. EPSON 18-22 S1C17704 TECHNICAL MANUAL...
19 SPI 19.1 Configuration of the SPI The S1C17704 equipped with a synchronous serial interface module (hereafter SPI). The SPI module supports both master and slave modes and performs 8-bit serial data transfer. Data transfer timing (clock phase and polarity variations) is selectable from among 4 types.
∗ P22MUX: P22 Port Function Select Bit in the P2 Port Function Select (P2_PMUX) Register (D2/0x52a2) P17 → #SPISS ∗ P17MUX: P17 Port Function Select Bit in the P1 Port Function Select (P1_PMUX) Register (D7/0x52a1) For details on switching pin function, see Section 10.2, “Selecting I/O Pin Functions (Port MUX).” EPSON 19-2 S1C17704 TECHNICAL MANUAL...
Note: The frequency of the clock input from the SPICLK pin must be 1/3 of PCLK or lower and the clock duty ratio must be 50%. PCLK SPICLK input Differentiated SPICLK SPI clock (internally used) Figure 19.3.2 SPI Clock in Slave Mode EPSON S1C17704 TECHNICAL MANUAL 19-3...
In slave mode, the SPBSY flag indicates the SPI slave select signal (#SPISS pin) status; it goes 1 when this SPI module is selected as a slave or goes 0 when this SPI module is deselected. EPSON S1C17704 TECHNICAL MANUAL 19-5...
Page 270
In master mode, the SPBSY flag that indicates the shift register status can be used as in data transmission. EPSON 19-6 S1C17704 TECHNICAL MANUAL...
Page 271
When the SPEN bit is set to 0, the transmit and receive data buffers are placed in empty status (data is cleared if any remains). Furthermore, the data being transferred cannot be guaranteed if SPEN is set to 0 during transmitting/receiving. EPSON S1C17704 TECHNICAL MANUAL 19-7...
The IIFT6 flag is always set to 1 by the SPI interrupt request pulse, regardless of how the IIEN6 bit is set (even when set to 0). The interrupt level setup bits IILV6[2:0] set the interrupt level (0 to 7) of the SPI interrupt. EPSON 19-8 S1C17704 TECHNICAL MANUAL...
Page 273
For details on these interrupt control registers, as well as the device operation when an interrupt has occurred, see Chapter 6, “Interrupt Controller (ITC).” Interrupt vector The following shows the vector number and vector address for the SPI interrupt: Vector number: 18 (0x12) Vector address: 0x8048 EPSON S1C17704 TECHNICAL MANUAL 19-9...
Notes: • When setting the registers, be sure to write a 0, and not a 1, for all “reserved bits.” • Be sure to use 16-bit access instructions for reading/writing from/to the SPI registers. The SPI registers do not allow reading/writing using 32-bit and 8-bit access instructions. EPSON 19-10 S1C17704 TECHNICAL MANUAL...
SPTBE is reset to 0 when transmit data is written to the SPI_TXD register (transmit data buffer, 0x4322) and is set to 1 when the written data is transferred to the shift register (transmit operation started). Transmit data should be written to the SPI_TXD register when this bit = 1. EPSON S1C17704 TECHNICAL MANUAL 19-11...
SPI is sending data. The serial-converted data is output from the SDO pin beginning with the MSB, in which the bits set to 1 are output as high-level signals and those set to 0 output as low-level signals. EPSON 19-12 S1C17704 TECHNICAL MANUAL...
The serial data input from the SDI pin is converted into parallel data beginning with the MSB, with the high-level signals changed to 1s and the low-level signals changed to 0s. The resulting data is stored in this register. SPI_RXD is a read-only register, so no data can be written to it. EPSON S1C17704 TECHNICAL MANUAL 19-13...
SPICLK (CPOL = 1, CPHA = 0) SPICLK (CPOL = 0, CPHA = 1) SPICLK (CPOL = 0, CPHA = 0) SDI/SDO D7 (MSB) D0 (LSB) Fetching receive data into shift register Figure 19.7.1 Clock and Data Transfer Timing EPSON 19-14 S1C17704 TECHNICAL MANUAL...
Page 279
When SPEN is set to 1, the SPI module is activated and data transfer is enabled. When SPEN is set to 0, the SPI module goes off. Note: Make sure that the SPEN bit is 0 before setting the CPHA, CPOL, and MSSL bits. EPSON S1C17704 TECHNICAL MANUAL 19-15...
SPI registers do not allow reading/writing using 32-bit and 8-bit access instructions. • Do not access the SPI_CTL register (0x4326), while the SPBSY flag (D2/SPI_ST register) is set to 1 (during data transfer). ∗ SPBSY: Transfer Busy Flag in the SPI Status (SPI_ST) Register (D2/0x4320) EPSON 19-16 S1C17704 TECHNICAL MANUAL...
20 I 20.1 Configuration of the I The S1C17704 equipped with an I C bus interface module for high-speed synchronous serial communication. This C module operates as a master using the clock supplied from the 16-bit timer Ch.2 (supports single master mode only).
∗ P14MUX: P14 Port Function Select Bit in the P1 Port Function Select (P1_PMUX) Register (D4/0x52a1) P15 → SCL ∗ P15MUX: P15 Port Function Select Bit in the P1 Port Function Select (P1_PMUX) Register (D5/0x52a1) For details on switching pin function, see Section 10.2, “Selecting I/O Pin Functions (Port MUX).” EPSON 20-2 S1C17704 TECHNICAL MANUAL...
The I C module does not function as a slave device. The SCL input is used to check the SCL status of the I C bus but it is not used to input synchronous clock. EPSON S1C17704 TECHNICAL MANUAL 20-3...
C clock (16-bit timer Ch.2 output clock) frequency must be a 1/6 of PCLK or lower to use the noise remove function. ∗ NSERM: Noise Remove On/Off Bit in the I C Control (I2C_CTL) Register (D4/0x4342) EPSON 20-4 S1C17704 TECHNICAL MANUAL...
8-bit transmit/receive data register. So one 7-bit slave address can be sent at a time. A 10-bit address should be sent in two parts with software control. Figure 20.5.2 shows the address data format. EPSON S1C17704 TECHNICAL MANUAL 20-5...
Page 286
SDA line is not pulled down. The I C module regards this status as a NACK (1) returned (transmission fails). SDA (output) SDA (input) NACK SCL (output) START condition Figure 20.5.3 ACK and NACK EPSON 20-6 S1C17704 TECHNICAL MANUAL...
Page 287
SDA (output) SCL (output) STOP condition Figure 20.5.4 STOP Condition Set the STP bit (D1/I2C_CTL register) to 1 to generate a STOP condition. ∗ STP: Stop Control Bit in the I C Control (I2C_CTL) Register (D1/0x4342) EPSON S1C17704 TECHNICAL MANUAL 20-7...
C interrupt request pulse, regardless of how the IIEN7 bit is set (even when set to 0). The interrupt level setup bits IILV7[2:0] set the interrupt level (0 to 7) of the I C interrupt. EPSON S1C17704 TECHNICAL MANUAL 20-11...
Page 292
For details on these interrupt control registers, as well as the device operation when an interrupt has occurred, see Chapter 6, “Interrupt Controller (ITC).” Interrupt vector The following shows the vector number and vector address for the I C interrupt: Vector number: 19 (0x13) Vector address: 0x804c EPSON 20-12 S1C17704 TECHNICAL MANUAL...
Notes: • When setting the registers, be sure to write a 0, and not a 1, for all “reserved bits.” • Be sure to use 16-bit access instructions for reading/writing from/to the I C registers. The I registers do not allow reading/writing using 32-bit and 8-bit access instructions. EPSON S1C17704 TECHNICAL MANUAL 20-13...
1 (R/W): Enable 0 (R/W): Disable (default) When I2CEN is set to 1, the I C module is activated and data transfer is enabled. When I2CEN is set to 0, the I C module goes off. EPSON 20-14 S1C17704 TECHNICAL MANUAL...
C is operating (TBUSY = 1 or RBUSY = 1). A STOP condition will be generated upon completion of data transmission/reception (including an ACK transfer). STP is automatically reset to 0 after a STOP condition has been generated. EPSON S1C17704 TECHNICAL MANUAL 20-15...
Page 296
1. Set the slave address to RTDT[7:0] (D[7:0]/I2C_DAT register). (First transmit data when 10-bit address is used; see Figure 20.5.2.) 2. Set TXE (D9/I2C_DAT register) to 1. 3. Set STRT (D0/I2C_CTL register) to 1. STRT is automatically reset to 0, after a START condition has been generated. EPSON 20-16 S1C17704 TECHNICAL MANUAL...
1 (R/W): Error (NACK) 0 (R/W): ACK (default) To return ACK to the slave after data is received, set RTACK to 0 before the I C module sends the acknowledge bit. To return NACK, set RTACK to 1. EPSON S1C17704 TECHNICAL MANUAL 20-17...
Page 298
The serial data input from the SDA pin is converted into parallel data beginning with the MSB, with the high-level signals changed to 1s and the low-level signals changed to 0s. The resulting data is stored in this register. EPSON 20-18 S1C17704 TECHNICAL MANUAL...
RTDT[7:0] (D[7:0]/I2C_DAT register) is transferred to the shift register. When TINTE is set to 0, an I C transmit buffer empty interrupt is not generated. EPSON S1C17704 TECHNICAL MANUAL 20-19...
Page 300
20 I THIS PAGE IS BLANK. EPSON 20-20 S1C17704 TECHNICAL MANUAL...
21 Remote Controller (REMC) 21.1 Outline of the REMC The S1C17704 is equipped with a remote controller (REMC) module for generating/receiving infrared remote control signals. The REMC module consists of a carrier generator for generating a carrier signal using a prescaler...
∗ P04MUX: P04 Port Function Select Bit in the P0 Port Function Select (P0_PMUX) Register (D4/0x52a0) P05 → REMO ∗ P05MUX: P05 Port Function Select Bit in the P0 Port Function Select (P0_PMUX) Register (D5/0x52a0) For details on switching pin function, see Section 10.2, “Selecting I/O Pin Functions (Port MUX).” EPSON 21-2 S1C17704 TECHNICAL MANUAL...
The carrier signal is generated according to these settings as shown in Figure 21.3.1. Example: CGCLK[3:0] = 0x2 (PCLK•1/4), REMCH[5:0] = 2, REMCL[5:0] = 1 PCLK PSC output clock Count Carrier H carrier length L carrier length Figure 21.3.1 Carrier Signal Generation EPSON S1C17704 TECHNICAL MANUAL 21-3...
PCLK•1/16 PCLK•1/2048 PCLK•1/8 PCLK•1/1024 PCLK•1/4 PCLK•1/512 PCLK•1/2 PCLK•1/256 PCLK•1/1 (Default: 0x0) The data length counter can count up to 256. Select a count clock so that the data length can be counted within this range. EPSON 21-4 S1C17704 TECHNICAL MANUAL...
Write the value equivalent to the pulse width (high period or low period) of the transmit data to REMLEN[7:0] (D[7:0]/REMC_LCNT register) to set it to the data length counter. ∗ REMLEN[7:0]: Transmit/Receive Data Length Count Bits in the REMC Length Counter (REMC_LCNT) Register (D[7:0]/0x5345) EPSON S1C17704 TECHNICAL MANUAL 21-5...
Page 306
Note that a signal transition is regarded as noise if the signal level after the input changes is not sampled for two or more sampling clock cycles. In this case no rising edge or falling edge interrupt occurs. EPSON 21-6 S1C17704 TECHNICAL MANUAL...
Page 307
A data length counter underflow interrupt occurs even in data reception, use it for a terminate/error processing. (4) Terminating data reception After the last data transfer has finished, write 0 to the REMEN bit to terminate data reception. EPSON S1C17704 TECHNICAL MANUAL 21-7...
Furthermore, the interrupt handler routine must reset (write 1 to) REMRIF in the REMC module as well as the REMC interrupt flag in the ITC, to clear the cause of interrupt. EPSON 21-8 S1C17704 TECHNICAL MANUAL...
Page 309
For details on these interrupt control registers, as well as the device operation when an interrupt has occurred, see Chapter 6, “Interrupt Controller (ITC).” Interrupt vector The following shows the vector number and vector address for the REMC interrupt: Vector number: 17 (0x11) Vector address: 0x8044 EPSON S1C17704 TECHNICAL MANUAL 21-9...
REMC Interrupt Flag Register Indicates/resets interrupt occurrence status. The following describes each REMC register. These are all 8-bit registers. Note: When setting the registers, be sure to write a 0, and not a 1, for all “reserved bits.” EPSON 21-10 S1C17704 TECHNICAL MANUAL...
0(R/W): Disable (default) When REMEN is set to 1, the REMC module starts data transmission or data reception according to the REMMD (D1) setting. When REMEN is set to 0, the REMC module stops operating. EPSON S1C17704 TECHNICAL MANUAL 21-11...
The carrier signal is generated according to these settings as shown in Figure 21.7.1. Example: CGCLK[3:0] = 0x2 (PCLK•1/4), REMCH[5:0] = 2, REMCL[5:0] = 1 PCLK PSC output clock Count Carrier H carrier length L carrier length Figure 21.7.1 Carrier Signal Generation EPSON S1C17704 TECHNICAL MANUAL 21-13...
REMCL: L carrier length register data clk_in: Prescaler output clock frequency The H period length is specified with REMCH[5:0] (D[5:0]/REMC_CARH register). The carrier signal is generated according to these settings as shown in Figure 21.7.1. EPSON 21-14 S1C17704 TECHNICAL MANUAL...
When REMEN (D0/REMC_CFG register) is set to 1, the REMC module modulates the REMDT set value with the carrier signal and outputs the modulated signal from the REMO pin during data transmission. During data reception, the signal level of the input data pulse is set to this bit. EPSON S1C17704 TECHNICAL MANUAL 21-15...
Use an input transition interrupt to set the data length counter to 0xff and read the counter value when the next interrupt caused by an input transition occurs. The input data pulse width can be obtained from the difference between 0xff and the read value. EPSON 21-16 S1C17704 TECHNICAL MANUAL...
Enables or disables the interrupt by detecting the rising edge of the input signal. 1 (R/W): Enable interrupt 0 (R/W): Disable interrupt (default) REMUIE: Underflow Interrupt Enable Bit Enables or disables the interrupt by a data length counter underflow. 1 (R/W): Enable interrupt 0 (R/W): Disable interrupt (default) EPSON S1C17704 TECHNICAL MANUAL 21-17...
No cause of interrupt has occurred (default) 1 (W): Flag is reset 0 (W): Has no effect REMUIF is set to 1 when the data length counter underflows only when REMUIE (D0/REMC_IMSK register) is set to 1. EPSON 21-18 S1C17704 TECHNICAL MANUAL...
21 REMOTE CONTROLLER (REMC) 21.8 Precaution Before the REMC module can start operating, the prescaler must be run. EPSON S1C17704 TECHNICAL MANUAL 21-19...
Page 320
21 REMOTE CONTROLLER (REMC) THIS PAGE IS BLANK. EPSON 21-20 S1C17704 TECHNICAL MANUAL...
22 LCD Driver (LCD) 22.1 Configuration of LCD Driver The S1C17704 is equipped with an LCD driver which can drive an LCD panel with a maximum of 1,792 pixels (56 segments × 32 commons). Figure 22.1.1 shows the configuration of the LCD driver and the drive power supply.
22 LCD DRIVER (LCD) 22.2 LCD Power Supply The S1C17704 generates the LCD drive voltages V to V using the on-chip LCD system voltage regulator and power voltage booster. It is not necessary to supply external voltage. For details of the LCD power supply, see Chapter 4, “Power Supply.”...
When OSC1 (32.768 kHz typ.) is selected as the clock source Frame frequency = 64 Hz (typ.) When OSC3 is selected as the clock source OSC3 Frame frequency = ———— × LCKDV [Hz] OSC3 clock frequency [Hz] OSC3 LCKDV: OSC3 division ratio 1/32 to 1/512 EPSON S1C17704 TECHNICAL MANUAL 22-3...
The drive bias is fixed at 1/5 (using five voltages, V and V ) regardless of the drive duty selected. Figures 22.4.1 and 22.4.2 show the drive waveforms for 1/32 duty and 1/16 duty, respectively. EPSON 22-4 S1C17704 TECHNICAL MANUAL...
22 LCD DRIVER (LCD) 22.5 Display Memory The S1C17704 has a built-in 576-byte display memory located from address 0x80000 to address 0x8055f. The memory bit allocation to the COM/SEG pins will change according to the conditions below. (1) Drive duty (1/32 or 1/16)
Page 328
COMREV is 1 (default), the display memory bits are allocated to the COM pins in ascending order; when COMREV is set to 0, the addresses are allocated in descending order. (See Figures 22.5.1 and 22.5.2.) ∗ COMREV: Common Output Assignment Control Bit in the LCD Display Control (LCD_DCTL) Register (D6/0x50a0) EPSON 22-8 S1C17704 TECHNICAL MANUAL...
∗ DSPREV: Reverse Display Control Bit in the LCD Display Control (LCD_DCTL) Register (D4/0x50a0) However, the display cannot be reversed when “All off” is selected with DSPC[1:0] (D[1:0]/LCD_DCTL register). The display can be reversed when “All on” is selected. EPSON S1C17704 TECHNICAL MANUAL 22-9...
Gray levels that can be produced depend on the LCD panel characteristics. The gray scale display should be performed by controlling the frame frequency and the frame cycles to turn the pixel on and off according to the panel characteristics. See Section 22.7 for the frame interrupt. EPSON 22-10 S1C17704 TECHNICAL MANUAL...
• No other cause of interrupt having higher priority, such as NMI, has occurred. For details on these interrupt control registers, as well as the device operation when an interrupt has occurred, see Chapter 6, “Interrupt Controller (ITC).” EPSON S1C17704 TECHNICAL MANUAL 22-11...
Page 332
2. After an interrupt occurs, reset the LCD interrupt flag FRMIF of the LCD module in the interrupt handler routine (this also resets the interrupt flag in the ITC). Interrupt vector The following shows the vector number and vector address for the LCD interrupt: Vector number: 10 (0x0a) Vector address: 0x8028 EPSON 22-12 S1C17704 TECHNICAL MANUAL...
LCD Interrupt Flag Register Indicates/resets interrupt occurrence status. The following describes each LCD register. These are all 8-bit registers. Note: When setting the registers, be sure to write a 0, and not a 1, for all “reserved bits.” EPSON S1C17704 TECHNICAL MANUAL 22-13...
Setting DSPREV to 0 reverses the display (turns black pixels white and vice versa), and setting it to 1 returns the display to normal. This operation does not affect the contents of the display memory. D[3:2] Reserved EPSON 22-14 S1C17704 TECHNICAL MANUAL...
Page 335
DSPC[1:0] is not reset to 0x0 (display off) on execution of a slp command. DSPC[1:0] should be reset to 0x0 (display off) via software before executing a slp command, since switching to SLEEP mode with the LCD display left on will degrade the LCD. EPSON S1C17704 TECHNICAL MANUAL 22-15...
Table 22.8.3 LCD Contrast Adjustment LC[3:0] Contrast High (dark) ↑ ↓ Low (light) (Default: 0x0) At initial reset, LC[3:0] is set to 0x0. Initialize LC[3:0] with software to set the display to the desired contrast. EPSON 22-16 S1C17704 TECHNICAL MANUAL...
LCD heavy load protection mode 1 On 0 Off Control Register D3–0 – reserved – – – 0 when being read. (LCD_VREG) For details of the control bits, see “0x50a3: LCD Voltage Regulator Control Register (LCD_VREG)” in Section 4.5. EPSON 22-18 S1C17704 TECHNICAL MANUAL...
Control Register VDSEL Regulator power source select (LCD_PWR) PBON Power voltage booster control 1 On 0 Off For details of the control bits, see “0x50a4: LCD Power Voltage Booster Control Register (LCD_PWR)” in Section 4.5. EPSON S1C17704 TECHNICAL MANUAL 22-19...
Setting FRMIE to 1 enables the LCD module to request interrupts to the ITC; setting to 0 disables the interrupt. In addition, it is necessary to set the LCD interrupt enable bits in the ITC to interrupt enabled to actually generate an interrupt. EPSON 22-20 S1C17704 TECHNICAL MANUAL...
(this also resets the interrupt flag in the ITC). The FRMIF flag is reset by writing 1. Note: To avoid occurrence of unnecessary interrupts, be sure to reset the FRMIF flag before the LCD interrupt is enabled using FRMIE. EPSON S1C17704 TECHNICAL MANUAL 22-21...
• To avoid occurrence of unnecessary interrupts, be sure to reset FRMIF (D0/LCD_IFLG register) before the LCD interrupt is enabled using FRMIE (D0/LCD_IMSK register). • For precautions on the LCD power supply, see Section 4.6, “Precautions.” EPSON 22-22 S1C17704 TECHNICAL MANUAL...
23.1 Outline of the SVD module The S1C17704 is equipped with a supply voltage detector (SVD) to detect supply voltage drop. The SVD module allows software to turn the circuit on and off, to set an evaluate voltage level and to read the detection results. Also it can generate an interrupt when voltage drop has been detected.
SVDC[3:0] Compare voltage 2.7 V 2.6 V 2.5 V 2.4 V 2.3 V 2.2 V 2.1 V 2.05 V 2.0 V 1.95 V 1.9 V 1.85 V 1.8 V 0x2 to 0x0 Reserved (Default: 0x0) EPSON 23-2 S1C17704 TECHNICAL MANUAL...
SVDDT (D0/SVD_RSLT register) after writing 1 to SVDEN (D0/SVD_EN register). • The SVD operation increases current consumption. Therefore, set SVDEN to 0 to disable the SVD operation if supply voltage detection is not necessary. EPSON S1C17704 TECHNICAL MANUAL 23-3...
• No other cause of interrupt having higher priority, such as NMI, has occurred. For details on these interrupt control registers, as well as the device operation when an interrupt has occurred, see Chapter 6, “Interrupt Controller (ITC).” EPSON 23-4 S1C17704 TECHNICAL MANUAL...
Page 347
2. After an interrupt occurs, reset the SVDIF interrupt flag of the SVD module in the interrupt handler routine (this also resets the interrupt flag in the ITC). Interrupt vector The following shows the vector number and vector address for the SVD interrupt: Vector number: 9 (0x09) Vector address: 0x8024 EPSON S1C17704 TECHNICAL MANUAL 23-5...
SVD Interrupt Flag Register Indicates/resets interrupt occurrence status. The following describes each SVD register. These are all 8-bit registers. Note: When setting the registers, be sure to write a 0, and not a 1, for all “reserved bits.” EPSON 23-6 S1C17704 TECHNICAL MANUAL...
SVDDT (D0/SVD_RSLT register) after writing 1 to SVDEN. • The SVD operation increases current consumption. Therefore, set SVDEN to 0 to disable the SVD operation if supply voltage detection is not necessary. EPSON S1C17704 TECHNICAL MANUAL 23-7...
The SVD module compares the voltage set with SVDC[3:0] and the supply voltage (V ) and output the results to indicate whether or not the supply voltage is equal to or higher than the compare voltage. EPSON 23-8 S1C17704 TECHNICAL MANUAL...
The SVD module keeps comparing the supply voltage (V ) and the voltage level set with SVDC[3:0] (D[3:0]/SVD_CMP register) while SVDEN (D0/SVD_EN register) is set to 1. By reading SVDDT, the current supply voltage status can be monitored. EPSON S1C17704 TECHNICAL MANUAL 23-9...
Setting SVDIE to 1 enables the SVD module to request interrupts to the ITC; setting to 0 disables the interrupt. In addition, it is necessary to set the SVD interrupt enable bits in the ITC to interrupt enabled to actually generate an interrupt. EPSON 23-10 S1C17704 TECHNICAL MANUAL...
(this also resets the interrupt flag in the ITC). The SVDIF flag is reset by writing 1. Note: To avoid occurrence of unnecessary interrupts, be sure to reset the SVDIF flag before the SVD interrupt is enabled using SVDIE (D0/SVD_IMSK register). EPSON S1C17704 TECHNICAL MANUAL 23-11...
SVD operation if supply voltage detection is not necessary. • To avoid occurrence of unnecessary interrupts, be sure to reset the SVDIF flag (D0/SVD_IFLG register) before the SVD interrupt is enabled using SVDIE (D0/SVD_IMSK register). EPSON 23-12 S1C17704 TECHNICAL MANUAL...
Work area for debugging A 64-byte work area is required for debugging. In the S1C17704, the address range from 0x000fc0 to 0x000fff in the RAM is reserved as the work area for debugging. When using the debug functions, do not access this area from the application program.
∗ O1DBG: OSC1 Peripheral Control (in Debug Mode) Bit in the OSC1 Peripheral Control (MISC_OSC1) Register (D0/0x5322) Note that the 8-bit OSC1 timer does not stop in debug mode even if O1DBG is set to 1. EPSON 24-2 S1C17704 TECHNICAL MANUAL...
Debug RAM Base Register Indicates the debug RAM base address. The following describes the registers for debugging individually. Note: When setting the registers, be sure to write a 0, and not a 1, for all “reserved bits.” EPSON S1C17704 TECHNICAL MANUAL 24-3...
The following lists the OSC1 peripheral modules that operate with the OSC1 clock: • Clock timer • Watchdog timer • Stopwatch timer Note that the 8-bit OSC1 timer does not stop in debug mode even if O1DBG is set to 1. EPSON 24-4 S1C17704 TECHNICAL MANUAL...
D23–0 DBRAM[23:0] Debug RAM base address 0xfc0 0xfc0 (DBRAM) D[31:24] Unused (fixed at 0) D[23:0] DBRAM[23:0]: Debug RAM Base Address Bits This is a read-only register that contains the start address of a work area (64 bytes) for debugging. EPSON S1C17704 TECHNICAL MANUAL 24-5...
Page 360
24 ON-CHIP DEBUGGER (DBG) THIS PAGE IS BLANK. EPSON 24-6 S1C17704 TECHNICAL MANUAL...
V µF ∗1 Capacitor between CF and CG µF ∗1 The capacitors are not necessary when LCD driver is not used. In this case, leave the V to V and CA to CG pins open. EPSON S1C17704 TECHNICAL MANUAL 26-1...
Pxx, V = 0V, f = 1MHz, Ta = 25°C Segment/Common output current SEGxx, COMxx, V - 0.1V µA SEGH SEGH SEGxx, COMxx, V = 0.1V µA SEGL SEGL ∗1 When Schmitt input is enabled EPSON 26-2 S1C17704 TECHNICAL MANUAL...
∗1 Data transfer and data verification are included and erase/program start control time is not included. ∗2 The erase/program count assumes that “erasing + programming” or “programming only” is one count and the programmed data is guaranteed to be retained for 10 years. EPSON 26-4 S1C17704 TECHNICAL MANUAL...
∗8 The values of current consumption while the CPU was operating were measured when a test program consisting of 60.5% ALU instructions, 17% branch instructions, 12% memory read instructions, and 10.5% memory write in- structions was executed continuously in the Flash memory. EPSON S1C17704 TECHNICAL MANUAL 26-5...
= 0V, Ta = -20 to 70°C Item Symbol Min. Typ. Max. Unit SCL cycle time 2500 Start condition hold time Data output delay time Stop condition hold time ∗ f : System operating clock frequency EPSON 26-6 S1C17704 TECHNICAL MANUAL...
26.6.4 System AC Characteristics #RESET Unless otherwise specified: V = 1.8 to 3.6V, V = 0V, V = 0.8V = 0.2V , Ta = -20 to 70°C Item Symbol Min. Typ. Max. Unit Reset Low pulse width µs EPSON S1C17704 TECHNICAL MANUAL 26-7...
Frequency/power voltage deviation ∂f/∂V ppm/V ∂f/∂C Frequency adjustment range = constant, C = 0 to 25pF ∗1 C-002RX: manufactured by Seiko Epson OSC3 (Crystal) ∗1 Unless otherwise specified: V = 1.8 to 3.6V, V = 0V, Ta = 25°C, crystal resonator = CA-301 = 1MΩ,...
Ta = 70°C, Max. value –V = 1.8 V = 2.4 V = 3.6 V Low level output current - voltage characteristic Ta = 70°C, Min. value = 3.6 V = 2.4 V = 1.8 V EPSON S1C17704 TECHNICAL MANUAL 26-9...
Page 372
LCD drive voltage - supply voltage characteristic (with the power voltage booster used) When a 1 MΩ load resistor is connected between V and V . (no panel load) Ta = 25°C, Typ. value LCx = 0xf LCx = 0x0 EPSON 26-10 S1C17704 TECHNICAL MANUAL...
Page 373
0.95V Ta [°C] LCD drive voltage - load characteristic When a load is connected to the V pin only LCx = 0xf, Ta = 25°C, Typ. value 5.80 5.75 5.70 5.65 5.60 5.55 5.50 [μA] EPSON S1C17704 TECHNICAL MANUAL 26-11...
Page 374
OSC3 = OFF, VD1MD = 0, PCKEN = 0, Typ. value OSC1 Ta [°C] Run state current consumption - temperature characteristic (during operation with OSC1) <Crystal oscillation, f = 32.768 kHz> Typ. value OSC1 VD1MD = 1 VD1MD = 0 Ta [°C] EPSON 26-12 S1C17704 TECHNICAL MANUAL...
Page 375
Ta = 25°C, Typ. value 4000 VD1MD = 1 3500 3000 2500 2000 VD1MD = 0 1500 1000 1000 [kΩ] OSC3 oscillation frequency - resistor characteristic <CR oscillation> Ta = 25°C, Typ. value 10000 1000 1000 [kΩ] EPSON S1C17704 TECHNICAL MANUAL 26-13...
Page 376
10000 1000 Ta [°C] Processing power - frequency characteristic = 3.6V, VD1MD = 0, Typ. value 1600 FLCYC = 4 (1 cycle) 1400 1200 FLCYC = 0 (2 cycles) 1000 10.0 OSC3 clock frequency [MHz] EPSON 26-14 S1C17704 TECHNICAL MANUAL...
I2C_CTL C Control Register Controls the I C operation and indicates transfer status. 0x4344 I2C_DAT C Data Register Transmit/receive data 0x4346 I2C_ICTL C Interrupt Control Register Controls the I C interrupt. 0x4348–0x435f – – Reserved EPSON S1C17704 TECHNICAL MANUAL AP-1...
Page 384
Controls the P1 port Schmitt trigger input. 0x5215 P1_IMSK P1 Port Interrupt Mask Register Enables/disables the P1 port interrupt. 0x5216 P1_EDGE P1 Port Interrupt Edge Select Register Selects the signal edge for generating P1 port interrupts EPSON AP-2 S1C17704 TECHNICAL MANUAL...
Page 385
Indicates the debug RAM base address. Note: Do not access the “Reserved” address in the table above and unused areas in the peripheral area that are not described in the table from the application program. EPSON S1C17704 TECHNICAL MANUAL AP-3...
R/W These bits must be set before setting CPOL Clock polarity select 1 Active L 0 Active H SPEN to 1. MSSL Master/slave mode select 1 Master 0 Slave SPEN SPI enable 1 Enable 0 Disable EPSON S1C17704 TECHNICAL MANUAL AP-11...
32 Hz interrupt flag 1 Cause of 0 Cause of R/W Reset by writing 1. Register interrupt interrupt not CTIF8 8 Hz interrupt flag (CT_IFLG) occurred occurred CTIF2 2 Hz interrupt flag CTIF1 1 Hz interrupt flag EPSON S1C17704 TECHNICAL MANUAL AP-13...
(8 bits) SIF1 1 Hz interrupt flag 1 Cause of 0 Cause of R/W Reset by writing 1. Flag Register interrupt interrupt not SIF10 10 Hz interrupt flag (SWT_IFLG) occurred occurred SIF100 100 Hz interrupt flag EPSON AP-14 S1C17704 TECHNICAL MANUAL...
– – 0 when being read. Timer Interrupt (8 bits) T8OIF 8-bit OSC1 timer interrupt flag 1 Cause of 0 Cause of R/W Reset by writing 1. Flag Register interrupt interrupt not (T8OSC1_IFLG) occurred occurred EPSON S1C17704 TECHNICAL MANUAL AP-19...
D7–1 – reserved – – – 0 when being read. Flag Register (8 bits) SVDIF SVD interrupt flag 1 Cause of 0 Cause of R/W Reset by writing 1. (SVD_IFLG) interrupt interrupt not occurred occurred EPSON AP-20 S1C17704 TECHNICAL MANUAL...
0 when being read. Interrupt (16 bits) CBIF Compare B interrupt flag 1 Cause of 0 Cause of R/W Reset by writing 1. Flag Register interrupt interrupt not CAIF Compare A interrupt flag occurred occurred (T16E_IFLG) EPSON AP-24 S1C17704 TECHNICAL MANUAL...
Flag Register (8 bits) REMFIF Falling edge interrupt flag 1 Cause of 0 Cause of R/W Reset by writing 1. (REMC_IFLG) REMRIF interrupt interrupt not Rising edge interrupt flag occurred occurred REMUIF Underflow interrupt flag EPSON AP-26 S1C17704 TECHNICAL MANUAL...
ICD (e.g. S5U1C17001H). Use the S1C17704 DCLK (P31), DST2 (P32), and DSIO (P33) pins as the debug pins and connect them to the four-pin connector. In this case, the P31 to P33 general-purpose I/O ports cannot be used.
The S1C17704 has a self-programming function that allows the application program being executed to erase and program the Flash memory while the S1C17704 is running on the target board. For the S1C17704, an object file that includes the functional routines for self-programming is provided as the self-programming package.
Current consumption depends, to a large degree, on the CPU operating mode, operating clock frequency, and the peripheral circuits to be activated. This chapter summarizes the control to save power. C.1 Power Saving by Clock Control Figure C.1.1 shows the S1C17704 clock system. SLEEP, On/Off control wakeup...
- 16-bit timer Ch.0–2 - Interrupt controller - SPI - SVD circuit - Power control circuit - P port & port MUX (control registers and chattering filters) - PWM & capture timer - MISC register - Remote controller EPSON S1C17704 TECHNICAL MANUAL AP-31...
Page 414
If the IE flag in the CPU has been set to 0, the CPU does not accept the interrupt request and starts executing the instructions that follow the halt instruction. If the IE flag has been set to 1, the CPU executes the interrupt handler. EPSON AP-32 S1C17704 TECHNICAL MANUAL...
• When the LCD display is not necessary, turn the LCD driver off. Also the power voltage booster should be turned off. Supply voltage detector (SVD) • The SVD operation increases current consumption. Turn the SVD module off when supply voltage detection is not necessary. EPSON S1C17704 TECHNICAL MANUAL AP-33...
When the OSC3 output is jittery, the operating frequency will be lowered. When the OSC1 output is noisy, operation of the timers using the OSC1 clock and the CPU core after the system clock is switched to OSC1 will be unstable. EPSON AP-34 S1C17704 TECHNICAL MANUAL...
Do not arrange a high-speed signal line especially near circuits that are sensitive to noise such as the oscillator unit. Prohibited pattern OSC1, OSC3 OSC2, OSC4 Large current signal line High-speed signal line EPSON S1C17704 TECHNICAL MANUAL AP-35...
Page 418
Take corrective measures by shortening the parallel distance (to several cm) or separating signal lines (2 mm or more). EPSON AP-36 S1C17704 TECHNICAL MANUAL...
Page 419
(experimental confirmation), (2) Electromagnetic induction noise from the tip of a soldering iron Especially when using a soldering iron, make sure that the IC GND and soldering iron GND are at the same potential before soldering. EPSON S1C17704 TECHNICAL MANUAL AP-37...