English
Language : 

W83L518D_05 Datasheet, PDF (10/25 Pages) Winbond – Integrated Media Reader
W83L518D
5. GENERAL-PURPOSE I/O PORTS (GPIO)
W83L518D supports one group of dedicated general-purpose I/O ports and a multi-functional GPIO
group, which share the same pines with the SD interface sockets. There are cases when only one
socket is needed in a system and pins for the other unused socket are wasted. To provide the most
cost-effective solution, W83L518D could be configured to transform these pins into general-purpose
I/O ports.
The first group (GP10 ~ 17) is configured through the configuration registers CRF0 ~ CRF2 in logical
device 2 and the other group (GP20 ~27) through CRF3 ~ F5. Users can configure each individual
port to be an input or output port by programming respective bit in direction register (CRF0/CRF3: 0 =
output, 1 = input). Invert port value by setting inversion register (CRF2/CRF5: 0 = non-inverse, 1 =
inverse). Port value is read/written through data register (CRF1/CRF4). Table 5.1 and 5.2 illustrate
GPIO's assignment. To further facilitate system design, W83L518D allows direct accesses to data
register and direction register through I/O ports, whose base address is programmable at CR 60, 61 in
logical device 2. Detailed configuration is described in logical device 2 of section 6:
CONFIGURATION REGISTER.
GP10 (pin 14) also functions as a power-on setting pin whose value is latched on the rising edge of
RESET# (pin 4) to select configuation port addresses. Therefore, GP10 is a push-pull I/O port unlike
the other GPIO ports, which are open-drained I/Os to support this power-on setting feature.
GP11 (pin 13) could function as a card detection input if selected by SDI to support some MMC cards,
which don't offer card detection feature through DATA3 pin.
Table 5.1
DIRECTION BIT INVERSION BIT
0 = OUTPUT 0 = NON INVERSE
I/O OPERATION
1 = INPUT
1 = INVERSE
0
0
Basic non-inverting output
0
1
Basic inverting output
1
0
Basic non-inverting input
1
1
Basic inverting input
-8-