7-4
Seiko Epson Corporation
S1C31D50 TECHNICAL MANUAL
(Rev. 1.00)
7.4.
Operations
7.4.1.
Initialization
After a reset, the ports except for the debugging function are configured as shown below.
•
Port input:
Disabled
•
Port output:
Disabled
•
Pull-up:
Off
•
Pull-down:
Off
•
Port pins:
High impedance state
•
Port function:
Configured to GPIO
This status continues until the ports are configured via software. The debugging function ports are
configured for debug signal input/output.
Initial settings when using a port for a peripheral I/O function
When using the P
xy
port for a peripheral I/O function, perform the following software initial settings:
1.
Set the following PPORTP
x
IOEN register bits:
-
Set the PPORTP
x
IOEN.P
x
IEN
y
bit to 0.
(Disable input)
-
Set the PPORTP
x
IOEN.P
x
OEN
y
bit to 0.
(Disable output)
2.
Set the PPORTP
x
MODSEL.P
x
SEL
y
bit to 0.
(Disable peripheral I/O function)
3.
Initialize the peripheral circuit that uses the pin.
4.
Set the PPORTP
x
FNCSEL.P
xy
MUX[1:0] bits.
(Select peripheral I/O function)
5.
Set the PPORTP
x
MODSEL.P
x
SEL
y
bit to 1.
(Enable peripheral I/O function)
For the list of the peripheral I/O functions that can be assigned to each port of this IC, refer to
“Control R
egister and Port Function Configuration of this IC.
”
For the specific information on the
peripheral I/O functions, refer to the respective peripheral circuit chapter.
Initial settings when using a port as a general-purpose output port
(only for the ports with GPIO function)
When using the P
xy
port pin as a general-purpose output pin, perform the following software initial
settings:
1.
Set the PPORTP
x
IOEN.P
x
OEN
y
bit to 1.
(Enable output)
2.
Set the PPORTP
x
MODSEL.P
x
SEL
y
bit to 0.
(Enable GPIO function)
Summary of Contents for S1C31D50
Page 461: ...25 1 Seiko Epson Corporation S1C31D50 TECHNICAL MANUAL Rev 1 00 25 Package TQFP12 48PIN ...
Page 462: ...25 2 Seiko Epson Corporation S1C31D50 TECHNICAL MANUAL Rev 1 00 QFP13 64PIN ...
Page 463: ...25 3 Seiko Epson Corporation S1C31D50 TECHNICAL MANUAL Rev 1 00 TQFP14 80PIN ...
Page 464: ...25 4 Seiko Epson Corporation S1C31D50 TECHNICAL MANUAL Rev 1 00 QFP15 100PIN ...