Slide 1 Slide 2 Slide 3 Slide 4 Slide 5 Slide 6 Slide 7 Slide 8 Slide 9 Slide 10 Slide 11 Slide 12 Product List
GPIO-Slide4

Each I/O can be individually configured as input or output (default on power up reset is input). When configured as output, the port is in a push-pull configuration. Writing to the GPIO register actually writes to the OLAT register. The GPIO register reflects the state of the pad, regardless if the configures as an input or output. You can emulate an open-drain configuration by clearing the latch bit and using the direction register (IODIR) to put the logic states on the pad. Pull-up resistor on pin, clear latch pin so a ‘0’ will be driven when pin is configured as an output. The pin will float high when pin is an input and drive low when pin is an output. Remember, GPIO register always reflects the state on the pin. Each pin has individually selectable internal weak pull-up resistors.

PTM Published on: 2011-11-07