45
MC95FG308 / MC95FG208
ABOV Semiconductor Co., Ltd.
9
I/O Ports
9.1
I/O Ports
The MC95FG308 has four I/O ports (P0, P1, P2 and P3). Each port can be easily configured by software as I/O pin,
internal pull up and open drain pin to meet various system configurations and design requirements. Also P0 includes
function that can generate interrupt according to change of state of the pin.
9.2
Port Register
9.2.1
Data Register (Px)
Data Register is a bidirectional I/O port. If ports are configured as output ports, data can be written to the
corresponding bit of the Px. If ports are configured as input ports, the data can be read from the corresponding bit of
the Px.
Note) Do not use the “direct bit test and branch” instruction for input port, more detail information is at
Appendix B.
(example) avoid direct input port bit test and branch condition as below
If(P00)
→
if(P0 & 0x01)
9.2.2
Direction Register (PxIO)
Each I/O pin can independently used as an input or an output through the PxIO register. Bits cleared in this read/write
register will select the corresponding pin in Px to become an input, setting a bit sets the pin to output. All bits are
cleared by a system reset.
9.2.3
Pull-up Resistor Selection Register (PxPU)
The on-chip pull-up resistor can be connected to them in 1-bit units with a pull-up resistor selection register (PxPU).
The pull-up register selection controls the pull-up resister enable/disable of each port. When the corresponding bit is 1,
the pull-up resister of the pin is enabled. When 0, the pull-up resister is disabled. All bits are cleared by a system reset.
(Only port pull-up resistor selection have default ON state for unused pins in 32-pin package for 16, 20, 28-pin
package).
9.2.4
Open-drain Selection Register (PxOD)
There is internally open-drain selection register (PxOD) in P0, P1, P2 and P3. The open-drain selection register
controls the open-drain enable/disable of each port. Ports become push-pull by a system reset.
9.2.5
De-bounce Enable Register (PxDB)
There is internally open-drain selection register (PxOD) in P0, P1, P2 and P3. The open-drain selection register
controls the open-drain enable/disable of each port. Ports become push-pull by a system reset.
Содержание MC95FG208 Series
Страница 14: ...14 MC95FG308 MC95FG208 ABOV Semiconductor Co Ltd 4 Package Diagram Figure 4 1 32 Pin SOP Package...
Страница 15: ...15 MC95FG308 MC95FG208 ABOV Semiconductor Co Ltd Figure 4 2 32 Pin QFN Package...
Страница 16: ...16 MC95FG308 MC95FG208 ABOV Semiconductor Co Ltd Figure 4 3 32 Pin LQFP Package...
Страница 17: ...17 MC95FG308 MC95FG208 ABOV Semiconductor Co Ltd Figure 4 4 28 Pin SOP Package...
Страница 18: ...18 MC95FG308 MC95FG208 ABOV Semiconductor Co Ltd Figure 4 5 28 Pin SOP Package continue...
Страница 19: ...19 MC95FG308 MC95FG208 ABOV Semiconductor Co Ltd Figure 4 6 28 Pin SOP Package...
Страница 20: ...20 MC95FG308 MC95FG208 ABOV Semiconductor Co Ltd Figure 4 7 28 Pin TSSOP Package...
Страница 21: ...21 MC95FG308 MC95FG208 ABOV Semiconductor Co Ltd Figure 4 8 20 Pin SOP Package...
Страница 22: ...22 MC95FG308 MC95FG208 ABOV Semiconductor Co Ltd Figure 4 9 20 Pin TSSOP Package...
Страница 23: ...23 MC95FG308 MC95FG208 ABOV Semiconductor Co Ltd Figure 4 10 16 Pin SOP Package...
Страница 24: ...24 MC95FG308 MC95FG208 ABOV Semiconductor Co Ltd Figure 4 11 16 Pin TSSOP Package...