Register Port Access
On the LPC2103 (ARMmite, ARMexpress LITE and PRO there is only one 32 bit IO port. On the LPC2138 in the ARMweb and DINkit, there are 10 additional lines in a second port. On the LPC17xx of the SuperPRO and PROplus there are 4 ports that have a subset of the 32 pins connected to the outside.
Those are controlled by a DIR register, SET and CLR registers. The state of the pin can be read at anytime with the PIN register. Each of these registers consists of 32 bits each bit corresponding to a pin. When a bit in the DIR register is 1, then that pin is an output. The state of that output can be controlled by writing a 1 to that bit of the SET register to make it high or 1 to that pin of the CLR register to make it low. Writing 0s to the SET and CLR registers do not affect those pins.
On the SuperPRO and PROplus:
On the ARMweb or DINkit: