17 Parallel Interface (PIO)
17-2
Seiko epson Corporation
S1C17F13 TeChniCal Manual
(Rev. 1.0)
External Connections
17.2.2
Figure 17.2.2.1 shows a connection diagram between PIO in this IC and an external (SRAM type) device.
PIOA[7:0]
PIOD[7:0]
#PIOCE
#PIORD
#PIOWR
A[7:0]
D[7:0]
#CE
#RD
#WR
S1C17 PIO
External device
2.2.1 Connections between PIO and an External Device
Figure 17.
Pin Pull-Up Function
17.2.3
PIO includes a pull-up resistor for the PIOD[7:0] pins. Setting the PIOMOD.PUL bit to 1 enables the resistor to
pull up the PIOD[7:0] pins.
Clock Settings
17.3
PIO Operating Clock
17.3.1
When using PIO, the PIO operating clock CLK_PIO must be supplied to PIO from the clock generator. The CLK_
PIO supply should be controlled as in the procedure shown below.
1. Enable the clock source in the clock generator if it is stopped (refer to “Clock Generator” in the “Power Supply,
Reset, and Clocks” chapter).
2. Set the following PIOCLK register bits:
- PIOCLK.CLKSRC[1:0] bits (Clock source selection)
- PIOCLK.CLKDIV[1:0] bits (Clock division ratio selection = Clock frequency setting)
Clock Supply in SLEEP Mode
17.3.2
When using PIO during SLEEP mode, the PIO operating clock CLK_PIO must be configured so that it will keep
supplying by writing 0 to the CLGOSC.
xxxx
SLPC bit for the CLK_PIO clock source.
Clock Supply in DEBUG Mode
17.3.3
The CLK_PIO supply during DEBUG mode should be controlled using the PIOCLK.DBRUN bit.
The CLK_PIO supply to PIO is suspended when the CPU enters DEBUG mode if the PIOCLK.DBRUN bit = 0.
After the CPU returns to normal mode, the CLK_PIO supply resumes. Although PIO stops operating when the
CLK_PIO supply is suspended, the input/output pins and registers retain the status before DEBUG mode was en-
tered. If the PIOCLK.DBRUN bit = 1, the CLK_PIO supply is not suspended and PIO will keep operating in DE-
BUG mode.
Operations
17.4
Initialization
17.4.1
PIO should be initialized with the procedure shown below.
1. Assign the PIO input/output function to the ports. (Refer to the “I/O Ports” chapter.)
2. Set the PIOCLK.CLKSRC[1:0] and PIOCLK.CLKDIV[1:0] bits. (Configure operating clock)