MC81F4x16
R0CONM – R03~05
R0 PORT CONTROL MIDDLE REGISTER
00C7H
A reset clears the R0CONM register to „00H‟, makes R04-R03 pins input mode. You can use
R0CONM register setting to select input or output mode (open-drain or push-pull) and enable
alternative functions.
When programming the port, please remember that any alternative peripheral I/O function that
defined by the R0CONM register must also be enabled in the associated peripheral module.
7
6
5
4
3
2
1
0
R05
R04
R03
R0CONM
Reset value: 00H
R/W
R/W
R/W
R/W
R/W
R/W
R/W
R/W
00: Schmitt trigger input mode (SI/EXT3)
01: Output mode, open-drain
R05
R05/AN3/EXT3/SI/T1O/PWM1O
R04/AN2/EXT2/SCK/EC1
10: Alternative function (AN3)
11: Alternative function (T1O/PWM1O)
000: Schmitt trigger input mode
(
*SCK in / EC1 / EXT2)
001: Output mode, open-drain
010: Alternative function (AN2)
011: Alternative function (SCK out)
1xx: Output mode, push-pull
R04
R03
000: Schmitt trigger input mode(EXT1)
001: Output mode, open-drain
010: Alternative function (AN1)
011: Alternative function (T0O/PWM0O)
1xx: Output mode, push-pull
R03/AN1/EXT1/T0O/PWM0O
Note:
If you want to use SIO module in slave mode, you must set SCK port as an input mode.
October 19, 2009 Ver.1.35
75