GPIO Wizard?

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

GPIO Wizard?

1,168 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by fran52 on Mon Jul 18 16:22:14 MST 2011

LPC1114/302
How many I/Os can I use, and at what current?  What is the easiest and fastest way to change the state?  Would using a SN74HC596n to drive the leds ( and/or a ULN2803A to sink the current) be better?
( 3D RGB LED cube )

Thanks
Labels (1)
0 Kudos
Reply
1 Reply

1,146 Views
lpcware
NXP Employee
NXP Employee
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.
0 Kudos
Reply