C P 2 1 3 0 - E K
8
Rev. 0.2
9.
Configure the general purpose input/output (GPIO) pins and read and write the pin latch values:
a. Select the GPIO pin mode from the
Pin Config
combo box. The following pin modes are available:
Input
,
Open Drain
, or
Push-Pull
. When a GPIO pin is configured in
Input
mode, the latch value can
only be read and not written. When the GPIO pin is configured for
Open Drain
mode, the pin is either
weakly pulled up to VIO or driven low. When the GPIO pin is configured for
Push-Pull
mode, the pin is
driven either high or low.
b. Read the current state of the GPIO pin latch from the
Logic Level
text field.
c. Toggle the GPIO pin latch value by clicking the
Drive High
/
Drive Low
button. Clicking
Drive High
will
set the latch value to ‘1’. Clicking
Drive Low
will set the latch value to ‘0’. Observe the new latch value
by reading the
Logic Level
text field. By default, each GPIO pin is connected to an LED. Driving a
latch value of ‘0’ will turn the LED on. Driving a latch value of ‘1’ will turn the LED off.
Figure 7. Controlling GPIO Pins
9a
9b
9c