Content originally posted in LPCWare by ktownsend on Thu Dec 15 15:27:52 MST 2011
You can use every GPIO available if you don't require it for another function (like I2C, SPI, etc.). The pins are all limited to sourcing or sinking 4mA max each, so if you need more than that (for a 20mA LED for example) you will probably need to use a transistor or something similar to safely switch the device on and off.
If you care about the speed, make sure that you are using the GPIO registers directly and not the functions provided in the different peripheral driver libraries made available by NXP or other parties. They are convenient and easy to understand, but there can be a lot of overhead using functions like this (depending on how they are declared), and you can take much longer than you would expect to perform your task compared to just setting one or two registers yourself.