574
Chapter 18
I
2
C Bus (IIC)
Preliminary User’s Manual U17566EE1V2UM00
18.2 I
2
C Pin Configuration
The I
2
C function requires to define the pins SCLn and SDAn as input and open
drain output pins simultaneously. In the following the pin configuration registers
are listed to be set up properly for I
2
C:
• PFSR0.PFSR04/5 = 1/0: select input for I
2
Cn (where applicable)
• PLCDCn.PLCDCnm = 0: no LCD output (where applicable)
• PFCn.PFCnm = 1/0: select ALT1-/ALT2-OUT (where applicable)
• PMCn.PMCnm = 1: alternative mode
• PICCn.PICCnm = 0: non-Schmitt Trigger input
• PDSCn.PDSCnm = 1: drive strength control Limit2
• PODCn.PODCnm = 1: open drain output
• PMn.PMnm = 1: input mode
It is recommended to set the output mode as the last step.
Table 17-3
shows how to set up the registers for activating I
2
C0 and I
2
C1 from
different pin groups.
Table 18-1
I
2
C interface pins set up
I
2
Cn
PFSR0 register
Pins and pin group
Register settings
I
2
C0
PFSR0.PFSR04 = 0 SDA0/SCL0 via P16/P17
PMC1.PMC1[7:6] = 11
B
PICC1.PICC1[7:6] = 00
B
PDSC1.PDSC1[7:6] = 11
B
PODC1.PODC1[7:6] = 11
B
PM1.PM1[7:6] = 11
B
PFSR0.PFSR04 = 1 SCL0/SDA0 via P64/P65
PLCDC6.PLCDC6[5:4] = 00
B
PFC6.PFC6[5:4] = 00
B
PMC6.PMC65 = 1
B
PICC6.PICC6[5:4] = 00
B
PDSC6.PDSC6[5:4] = 11
B
PODC6.PODC6[5:4] = 11
B
PM6.PM6[5:4] = 11
B
I
2
C1
PFSR0.PFSR05 = 0 SDA1/SCL1 via P20/P21
PLCDC2.PLCDC2[1:0] = 00
B
PMC2.PMC2[1:0] = 11
B
PICC2.PICC2[1:0] = 00
B
PDSC2.PDSC2[1:0] = 11
B
PODC2.PODC2[1:0] = 11
B
PM2.PM2[1:0] = 11
B
PFSR0.PFSR05 = 1 SDA1/SCL1 via P30/P31
PFC3.PFC30 = 1
B
PMC3.PMC3[1:0] = 11
B
PICC3.PICC3[1:0] = 00
B
PDSC3.PDSC3[1:0] = 11
B
PODC3.PODC3[1:0] = 11
B
PM3.PM3[1:0] = 11
B
electronic components distributor