Datasheet

FS98O22
Rev. 1.6 77/146
7.2. Digital I/O Port and External Interrupt Input : PT2[0], PT2[1], PT3[0], PT3[1]
Figure 7-2 PT2[0] PT2[1] PT3[0] PT3[1] function block
GPIO Port 2 Bit1 and Bit 0 (PT2[1:0])and Port 3 Bit1 and Bit 0 (PT3[1:0]) function block is shown in Figure 7-2.
The main function of the GPIO is input and output data between the Data bus and the ports. Users could control
the PT2EN[1:0] and PT3EN[1:0] register flags to decide the input output direction. The input and output
function and the related functions are explained as follows:
z Input:
GPIO Port 2 Bit1 and Bit0 (PT2[1:0]) could be the external interrupt ports as INT1 and INT0 or be the
general I/O ports. User should control INTE register E0IE and E1IE flags to decide if the interrupt is
enabled. The interrupt trigger mode is selected by E0M[1:0] and E1M[1:0] register flags. The input port
has a Schmitt trigger in it, and the up/down trigger voltage level is 0.45VDD/0.2VDD.
GPIO Port 3 Bit1 and Bit0 (PT3[1:0]) could be the external interrupt ports as INT3 and INT2 or be the
general I/O ports. User should control INTE register E2IE and E3IE flags to decide if the interrupt is
enabled. The interrupt trigger mode is selected by E2M[1:0] and E3M[1:0] register flags. The input port
has a Schmitt trigger in it, and the up/down trigger voltage level is 0.45VDD/0.2VDD.
z Output
FS98O22 sends the digital data out by an embedded D Flip Flop. When the program sends data out
through PT2 or PT3, the data will be sent to data bus first, and then the D Flip Flop will latch the signal for
PT2/PT3 output while the Write signal and AR (FS98O22 internal device address pointer) is pointed to
PT2/PT3.
z Pull up resistor
FS98O22 embeds an internal pull up resistor function in PT2 with about 1000k ohm resistor
12
. Users
could control the PT2PU[1:0] register flags to decide the connections to pull up resistor. When a port is
connected to the pull up resistor, the input data is, by default, assigned to high (data 1).
12
The pull up current is about 10uA. Remember to disable PT1PU before program falls into Sleep mode.
FORTUNE'
Properties
For Reference Only