ST2202A
types.ꢀThisꢀextendsꢀtheꢀflexibilityꢀofꢀtheꢀusageꢀofꢀfunctionꢀ
signals.ꢀ
ꢀ
PortꢁAꢀisꢀdesignedꢀforꢀkeyboardꢀscanꢀwithꢀdeꢁbounceꢀandꢀ
transitionꢀtriggeredꢀinterrupt,ꢀwhileꢀPortꢁC/D/Eꢀareꢀmultiplexedꢀ
withꢀotherꢀsystemꢀfunctions,ꢀandꢀareꢀcontrolledꢀbyꢀPFC,ꢀPFD,ꢀ
andꢀPMCR[2:0].ꢀPortꢁLꢀisꢀsharedꢀwithꢀLCDꢀspecificꢀsignalsꢀofꢀ
LCDC.ꢀTurningꢀoffꢀLCDCꢀbyꢀsettingꢀLPWRꢀ(LCTR[7])ꢀreservesꢀ
PortꢁLꢀforꢀGPIO.ꢀ
Note:ꢀAllꢀtheꢀpropertiesꢀofꢀpinsꢀareꢀstillꢀprogrammableꢀ
andꢀmustꢀbeꢀascertainedꢀbeforeꢀtheyꢀareꢀ
assignedꢀtoꢀsystemꢀfunctions,ꢀespeciallyꢀtheꢀ
directionꢀofꢀpins.ꢀ
ꢀ
SelectingꢀrespectiveꢀpinsꢀtoꢀbeꢀGPIOꢀorꢀsignalsꢀofꢀsystemꢀ
functionꢀwillꢀnotꢀaffectꢀoriginalꢀsettingsꢀofꢀI/Oꢀdirectionsꢀandꢀ
ꢀ
ꢀ
TABLE 9-3 Port Control Registers
Address
Name
R/W Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0
Default
$008~$00C / $07E PCA~PCE, PCL
R/Wꢀ PCx[7]ꢀ PCx[6]ꢀ PCx[5]ꢀ PCx[4]ꢀ PCx[3]ꢀ PCx[2]ꢀ PCx[1]ꢀ PCx[0]ꢀ 0000ꢀ0000ꢀ
ꢀ
Bitꢀ7~0:ꢀPCx[7:0] :ꢀPortꢁxꢀdirectionꢀcontrolꢀbitsꢀ
ꢀ=ꢀInputꢀmodeꢀ
1ꢀ=ꢀOutputꢀmodeꢀ
0
ꢀ
TABLE 9-4 Port Data Registers
R/W Bit 7 Bit 6 Bit 5 Bit 4 Bit 3
R/Wꢀ Px[7]ꢀ Px[6]ꢀ Px[5]ꢀ Px[4]ꢀ Px[3]ꢀ Px[2]ꢀ Px[1]ꢀ Px[0]ꢀ 1111ꢀ1111ꢀ
Address
Name
Bit 2
Bit 1
Bit 0
Default
$000~$004 / $07C PA~PE, PL
ꢀ
Bitꢀ7~0:ꢀPx[7:0] :ꢀPortꢀdataꢀ/ꢀpullꢁresistorꢀcontrolꢀbitsꢀ
ꢀ
I/O Modes
Input Mode
R/W
Output Mode
Read
Inputꢀdataꢀ
0ꢀ=ꢀDisableꢀpullꢁupꢀresistorꢀ
Outputꢀdataꢀ
Write
Selectꢀpullꢁdownꢀresistorꢀ(PortꢁCꢀonly)ꢀ
1
ꢀ=ꢀSelectꢀpullꢁupꢀresistorꢀ
ꢀ
ꢀ
TABLE 9-5 Port I/O Type Select Registers
Bit 6 Bit 5 Bit 4 Bit 3 Bit 2
R/Wꢀ PSC[7]ꢀ PSC[6]ꢀ PSC[5]ꢀ PSC[4]ꢀ PSC[3]ꢀ PSC[2]ꢀ PSC[1]ꢀ PSC[0]ꢀ 1111ꢀ1111ꢀ
Address
Name
PSC
R/W
Bit 7
Bit 1
Bit 0
Default
$005
ꢀ
Bitꢀ7~0:ꢀPSC[7:0] :ꢀPortꢀI/Oꢀtypesꢀselectionꢀbitsꢀ
ꢀ
Input Mode
Output Mode
0ꢀ=ꢀDisableꢀpullꢁup/downꢀresistersꢀ 0ꢀ=ꢀOpenꢁdrainꢀ
ꢀ=ꢀEnableꢀpullꢁup/downꢀresistersꢀ ꢀ=ꢀCMOSꢀ
1
1
ꢀ
ꢀ
TABLE 9-6 Port Function Select Registers
R/W Bit 7 Bit 6 Bit 5 Bit 4 Bit 3
R/Wꢀ RXD0ꢀ TXD0ꢀ SRDYꢀ SSꢀ MOSIꢀ MISOꢀ SCKꢀ INTXꢀ 0000ꢀ0000ꢀ
R/Wꢀ RXD1ꢀ TXD1ꢀ CS6ꢀ CS5ꢀ CS4ꢀ CS3ꢀ CS2ꢀ CS1ꢀ 0000ꢀ0000ꢀ
Address
Name
Bit 2
Bit 1
Bit 0
Default
$00D
$00E
PFC
PFD
ꢀ
Bitꢀ7~0:ꢀPFC/D[7:0] :ꢀPortꢀfunctionꢀselectꢀbitsꢀ
ꢀ=ꢀGPIOꢀ
1ꢀ=ꢀIndicatedꢀfunctionꢀsignalꢀisꢀconnectedꢀ
0
ꢀ
TABLE 9-7 Port Miscellaneous Control Register (PMCR)
Address Name
R/W
Bit 7
Bit 6
Bit 5
Bit 4
Bit 3
Bit 2
Bit 1
TCO1ꢀ
Bit 0
TCO0ꢀ
Default
$00F PMCR
R/Wꢀ
PULLꢀ
PDBNꢀ INTEGꢀ CSM1ꢀ CSM0ꢀ
BCOꢀ
1000ꢀ0000ꢀ
ꢀ
Bitꢀ7:ꢀ ꢀ PULL :ꢀEnable/disableꢀallꢀpullꢁupꢀresistersꢀofꢀPortꢁA/B/D/E/Lꢀ
ꢀ=ꢀEnableꢀpullꢁupꢀresistersꢀ
0ꢀ=ꢀDisableꢀpullꢁupꢀresistersꢀ
1
ꢀ
ꢀ
Verꢀ2.5ꢀ
16
/75
ꢀ
9/16/2008ꢀ