7 UNIVERSAL PORT MULTIPLEXER (UPMUX)
S1C17M12/M13 TECHNICAL MANUAL
Seiko Epson Corporation
7-1
(Rev. 1.2)
7 Universal Port Multiplexer (UPMUX)
7.1 Overview
UPMUX is a multiplexer that allows software to assign the desired peripheral I/O function to an I/O port. The main
features are outlined below.
• Allows programmable assignment of the synchronous serial interface, I
2
C, UART, and 16-bit PWM timer periph-
eral I/O functions to the P0, P1, and P2 port groups.
• The peripheral I/O function assigned via UPMUX is enabled by setting the P
x
FNCSEL.P
xy
MUX[1:0] bits to 0x1.
Note: ‘x’, which is used in the port names Pxy, register names, and bit names, refers to a port group (x
= 0, 1, 2) and ‘y’ refers to a port number (y = 0, 1, 2, ··· , 7).
Figure 7.1.1 shows the configuration of UPMUX.
UPMUX
Function 1 selection
Data, I/O control
Input data
selector
PxyPPFNC[2:0]
PxyPERICH[1:0]
PxyPERISEL[2:0]
Output data
selector
Peripheral circuit
I/O port
Pxy
Inter
nal data
bu
s
Figure 7.1.1 UPMUX Configuration
7.2 Peripheral Circuit I/O Function Assignment
An I/O function of a peripheral circuit supported may be assigned to peripheral I/O function 1 of an I/O port listed
above. The following shows the procedure to assign a peripheral I/O function and enable it in the I/O port:
1. Configure the P
x
IOEN register of the I/O port.
- Set the P
x
IOEN.P
x
IEN
y
bit to 0.
(Disable input)
- Set the P
x
IOEN.P
x
OEN
y
bit to 0.
(Disable output)
2. Set the P
x
MODSEL.P
x
SEL
y
bit of the I/O port to 0.
(Disable peripheral I/O function)
3. Set the following P
x
UPMUX
n
register bits (
n
= 0 to 3).
- P
x
UPMUX
n
.P
xy
PERISEL[2:0] bits
(Select peripheral circuit)
- P
x
UPMUX
n
.P
xy
PERICH[1:0] bits
(Select peripheral circuit channel)
- P
x
UPMUX
n
.P
xy
PPFNC[2:0] bits
(Select function to assign)
4. Initialize the peripheral circuit.
5. Set the P
x
FNCSEL.P
xy
MUX[1:0] bits of the I/O port to 0x1.
(Select peripheral I/O function 1)
6. Set the P
x
MODSEL.P
x
SEL
y
bit of the I/O port to 1.
(Enable peripheral I/O function)