
Writing 1s produces highs at the corresponding port pins.

This register controls the state of output pins. This register individually controls the direction of each port pin. Primary (default) function, typically GPIO port Below table shows how to select the function for a particular pin using two bits of the PINSEL register. The remaining 16 bits(P0.16-P0.32) are configured using 32bits of PINSEL1 register.Īs mentioned earlier every pin has a max of four functions. This implies that we need two PINSEL registers to configure a PORT pins.īy this, the first 16(P0.0-P0.16) pin functions of PORT0 can be selected by 32 bits of PINSEL0 register. As there can be up to 4 functions associated with a GPIO pin, two bits for each pin are available to select the function. The required function can be selected by configuring the PINSEL register.

Every GPIO pin has a minimum of one function and max of four functions.

The Below registers will be used for Configuring and using the GPIOs for sending and receiving the Digital signals.Īlmost all the LPC1768 pins are multiplexed to support more than 1 function.
