Pinout?

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

Pinout?

1,674 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by bocochoco on Mon Apr 26 13:36:56 MST 2010
Is there a more... useful... pinout for the lpxpresso lpc1343? I just got mine and noticed that the target board has labels like "P1.10". I was expecting it to have labels similar to my Arduino. I'm kinda confused about this.
0 Kudos
Reply
8 Replies

1,660 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by bocochoco on Tue Apr 27 11:37:19 MST 2010

Quote: igorsk
Yes, there is no ready-made standard API like in Arduino (NB: Arduino != AVR).
However, several sample projects include gpio.c/gpio.h files that provide simple functions such as GPIOSetDir and GPIOSetValue. Strangely there's no GPIOGetValue, but it shouldn't be hard to write.



I'll take a look at those examples when I get header pins in the lpc1343 target board. I don't suppose you would know of an absolute newbie guide would you? I'm familiar enough with C, but this is much more complex than I had thought it would be.
0 Kudos
Reply

1,660 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by igorsk on Tue Apr 27 11:18:41 MST 2010
Yes, there is no ready-made standard API like in Arduino (NB: Arduino != AVR).
However, several sample projects include gpio.c/gpio.h files that provide simple functions such as GPIOSetDir and GPIOSetValue. Strangely there's no GPIOGetValue, but it shouldn't be hard to write.
0 Kudos
Reply

1,660 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by bocochoco on Tue Apr 27 09:11:08 MST 2010

Quote: igorsk
Any pin that is marked in the manual as PIOn_m can be used as GPIO (which are most of the pins available, excluding power supply pins, xtal in and USB D+/D-). Analog inputs are more limited, only pins specifically marked ADn can be used as such.



I suppose theres no easy function like pinMode(2, OUTPUT); is there. Seems like an entirely new way of thinking compared to AVR.
0 Kudos
Reply

1,660 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by igorsk on Tue Apr 27 08:11:50 MST 2010

Quote: bocochoco
Am I correct that any of the non-GPIO pins can be set up as analog or digital input or output?


Any pin that is marked in the manual as PIOn_m can be used as GPIO (which are most of the pins available, excluding power supply pins, xtal in and USB D+/D-). Analog inputs are more limited, only pins specifically marked ADn can be used as such.
0 Kudos
Reply

1,660 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by bocochoco on Tue Apr 27 07:25:21 MST 2010

Quote: igorsk
P1.10 means "Port 1, pin 10". Since most pins can take on different functions besides GPIO (sometimes two or even three extra functions), labeling them all would be rather verbose. You can look up the possible functions in the User Manual. See chapter 6 and 7 for the description of pin functions. Or you can check the chapter for the peripheral that interests you. For example, in the I2C chapter you can see that SCL is configured by IOCON_PIO0_4, meaning that it's on the pin P0.4.


Hmm. That does make sense. I'm going to have to do some reading before I can really start using this it seems. Am I correct that any of the non-GPIO pins can be set up as analog or digital input or output?

I think using Arduino for so long may have dumbed me down :(
0 Kudos
Reply

1,660 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by igorsk on Mon Apr 26 15:45:08 MST 2010
P1.10 means "Port 1, pin 10". Since most pins can take on different functions besides GPIO (sometimes two or even three extra functions), labeling them all would be rather verbose. You can look up the possible functions in the User Manual. See chapter 6 and 7 for the description of pin functions. Or you can check the chapter for the peripheral that interests you. For example, in the I2C chapter you can see that SCL is configured by IOCON_PIO0_4, meaning that it's on the pin P0.4.
0 Kudos
Reply

1,660 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by bocochoco on Mon Apr 26 14:03:35 MST 2010

Quote: igorsk
What kind of labels does Arduino have and why "P1.10" is not clear?



They're labelled as DIGITAL, ANALOG IN, PWM, etc.

"P1.10" isn't clear to me because what is it for? I guess I just need to experiment a bit. New architecture for me that I've got to get used to.
0 Kudos
Reply

1,660 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by igorsk on Mon Apr 26 13:53:05 MST 2010
What kind of labels does Arduino have and why "P1.10" is not clear?
0 Kudos
Reply