11.07.2015 Views

MC95FB204 - abov.co.kr

MC95FB204 - abov.co.kr

MC95FB204 - abov.co.kr

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

<strong>MC95FB204</strong>9. I/O Ports9.1 I/O PortsThe <strong>MC95FB204</strong> has three I/O ports (P0, P1 and P2). Each port can be easily <strong>co</strong>nfigured bysoftware as I/O pin, internal pull up and open drain pin to meet various system <strong>co</strong>nfigurations anddesign requirements. Also P0 includes function that can generate interrupt ac<strong>co</strong>rding to change ofstate of the pin.9.2 Port Register9.2.1 Data Register (Px)Data Register is a bidirectional I/O port. If ports are <strong>co</strong>nfigured as output ports, data can be written tothe <strong>co</strong>rresponding bit of the Px. If ports are <strong>co</strong>nfigured as input ports, the data can be read from the<strong>co</strong>rresponding bit of the Px.9.2.2 Direction Register (PxIO)Each I/O pin can independently used as an input or an output through the PxIO register. Bits clearedin this read/write register will select the <strong>co</strong>rresponding pin in Px to be<strong>co</strong>me an input, setting a bit setsthe 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 <strong>co</strong>nnected to them in 1-bit units with a pull-up resistor selectionregister (PxPU). The pull-up register selection <strong>co</strong>ntrols the pull-up resister enable/disable of each port.When the <strong>co</strong>rresponding bit is 1, the pull-up resister of the pin is enabled. When 0, the pull-up resisteris disabled. All bits are cleared by a system reset. (Only P1[6:4] port pull-up resistor selection havedefault ON state for 16-pin Package). Pull-up operation is only enable in input mode.9.2.4 Open-drain Selection Register (PxOD)There is internally open-drain selection register (PxOD) in P0, P1, P2. The open-drain selectionregister <strong>co</strong>ntrols the open-drain enable/disable of each port. Ports be<strong>co</strong>me push-pull by a systemreset. You should <strong>co</strong>nnect an external resistor in open-drain output mode.9.2.5 ADC Leakage Current Protection Register (ALCPR)ALCPRx registers prevent the input leakage current when ports are <strong>co</strong>nnected to analog inputs. If thebit of ALCPRx is ‘1’, the dynamic current path of the schmitt AND gate of the port is cut off and thedigital input of the <strong>co</strong>rresponding port is always ‘0’.40 July 17, 2012 Ver.1.7

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!