Interrupts; S1C17M20/M21/M22/M23/M24/M25; Seiko Epson Corporation - Epson S1C17M20 Technical Manual

Cmos 16-bit single chip microcontroller
Table of Contents

Advertisement

6 I/O PORTS (PPORT)
Setting output data to a GPIO port
Write data (1 = high output, 0 = low output) to be output from the Pxy pin to the PxDAT.PxOUTy bit.
Reading input data from a GPIO port
The data (1 = high input, 0 = low input) input from the Pxy pin can be read out from the PxDAT.PxINy bit.
Chattering filter function
Some ports have a chattering filter function and it can be controlled in each port. This function is enabled by
setting the PxCHATEN.PxCHATENy bit to 1. The input sampling time to remove chattering is determined by
the CLK_PPORT frequency configured using the PCLK register in common to all ports. The chattering filter
removes pulses with a shorter width than the input sampling time.
Input sampling time = ———————————— [second]
Make sure the Pxy port interrupt is disabled before altering the PCLK register and PxCHATEN.PxCHATENy
bit settings. A Pxy port interrupt may erroneously occur if these settings are altered in an interrupt enabled sta-
tus. Furthermore, enable the interrupt after a lapse of four or more CLK_PPORT cycles from enabling the chat-
tering filter function.
If the clock generator is configured so that it will supply CLK_PPORT to PPORT in SLEEP mode, the chatter-
ing filter of the port will function even in SLEEP mode. If CLK_PPORT is configured to stop in SLEEP mode,
PPORT inactivates the chattering filter during SLEEP mode to input pin status transitions directly to itself.
Key-entry reset function
This function issues a reset request when low-level pulses are input to all the specified ports simultaneously.
Make the following settings when using this function:
1. Configure the ports to be used for key-entry reset as general-purpose input ports (refer to "Initial settings
when using a port as a general-purpose input port (only for the ports with GPIO function)").
2. Configure the input pin combination for key-entry reset using the PCLK.KRSTCFG[1:0] bits.
Note: When enabling the key-entry reset function, be sure to configure the port pins to be used for it
as general-purpose input pins before setting the PCLK.KRSTCFG[1:0] bits.
PPORT issues a reset request immediately after all the input pins specified by the PCLK.KRSTCFG[1:0] are
set to a low level if the chattering filter function is disabled (initial status). To issue a reset request only when
low-level signals longer than the time configured are input, enable the chattering filter function for all the ports
used for key-entry reset.
The pins configured for key-entry reset can also be used as general-purpose input pins.

6.5 Interrupts

When the GPIO function is selected for the port with an interrupt function, the port input interrupt function can be
used.
Interrupt
Port input interrupt
PxINTF.PxIFy
PINTFGRP.PxINT
Interrupt edge selection
Port input interrupts will occur at the falling edge of the input signal when setting the PxINTCTL.PxEDGEy bit
to 1, or the rising edge when setting to 0.
6-6
2 to 3
CLK_PPORT frequency [Hz]
Table 6.5.1 Port Input Interrupt Function
Interrupt flag
Rising or falling edge of the input signal
Setting an interrupt flag in the port group

Seiko Epson Corporation

Set condition

S1C17M20/M21/M22/M23/M24/M25

TECHNICAL MANUAL (Rev. 1.0)
(Eq.6.2)
Clear condition
Writing 1
Clearing PxINTF.PxIFy

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

S1c17m25S1c17m21S1c17m22S1c17m23S1c17m24

Table of Contents