EmbeddedRelated.com
Forums

Where is the I/O ports in this LPC2148 Prototype Board

Started by essam November 5, 2011
i ordered Philips LPC2148 (ARM) Prototype Board :
http://microcontrollershop.com/product_info.php?products_id83
the board didn't arrive yet just asking where is the input and output ports in this board ?
thank you

An Engineer's Guide to the LPC2100 Series

--- In l..., "essam" wrote:
>
> i ordered Philips LPC2148 (ARM) Prototype Board :
> http://microcontrollershop.com/product_info.php?products_id83
> the board didn't arrive yet just asking where is the input and output ports in this board ?
> thank you
>

There is an upside down L shaped row of pins on the right, basically around the open prorotyping area.

You need to go to the Olimex site and get the User Manual and Schematic for the board. I provided links below but the Olimex site also has some sample code and projects.

Not every pin shows up around the prototyping area; some pins appear only on the JTAG connector. However, the pins are laid out by function so the SPI0 pins also have a 3.3V and Gnd pin so a simple 6 pin cable can be used to connect some kind of SPI device. This is very handy.

http://olimex.com/dev/pdf/ARM/LPC/LPC-P2148.pdf

http://olimex.com/dev/pdf/ARM/LPC/LPC-P2148-schematic.pdf

Richard

--- In l..., "rtstofer" wrote:
>
> --- In l..., "essam" wrote:
> >
> > i ordered Philips LPC2148 (ARM) Prototype Board :
> > http://microcontrollershop.com/product_info.php?products_id83
> > the board didn't arrive yet just asking where is the input and output ports in this board ?
> > thank you
> > There is an upside down L shaped row of pins on the right, basically around the open prorotyping area.
>
> You need to go to the Olimex site and get the User Manual and Schematic for the board. I provided links below but the Olimex site also has some sample code and projects.
>
> Not every pin shows up around the prototyping area; some pins appear only on the JTAG connector. However, the pins are laid out by function so the SPI0 pins also have a 3.3V and Gnd pin so a simple 6 pin cable can be used to connect some kind of SPI device. This is very handy.
>
> http://olimex.com/dev/pdf/ARM/LPC/LPC-P2148.pdf
>
> http://olimex.com/dev/pdf/ARM/LPC/LPC-P2148-schematic.pdf
>
> Richard
>
thank you for the fast and helpful response. the picture in the user manual is clear and shows numerous pins but most of these pins are dedicated to I2C and SPI (after reading the wikipedia page for it i still don't know what "stuff" will connect to that port).

so not too many I/O ports remain as a general purpose I/O ports , why there is so few ports compared to say arduino mega which has 54 of them. i suspect that there is something i am missing here .your feedback is highly appreciated.
thank you

Hello Essam,

> so not too many I/O ports remain as a general purpose I/O ports ,
> why there is so few ports compared to say
> arduino mega which has 54 of them.
> i suspect that there is something i am missing here

every pin can be used for one of multiple functions.
E.g. instead of using a pin for SPI, you can use it as IO as well.

Have a look into user manual of LPC2148:

http://ics.nxp.com/support/documents/microcontrollers/pdf/user.manual.lpc2141.lpc2142.lpc2144.lpc2146.lpc2148.pdf

Especially chapter 5 and 6 are important for this topic.

Example: Look at page 50. There you see on top left pin 1

"P0.21/PWM5/CAP1.3"

It can be used as GPIO P0.21 or PWM5 or CAP1.3.

Look at page 61. There you find P0.21 in the table and
see what functions are possible for this pin.

Best regards,

Martin

--- In l..., "capiman26061973" wrote:
>
> Hello Essam,
>
> > so not too many I/O ports remain as a general purpose I/O ports ,
> > why there is so few ports compared to say
> > arduino mega which has 54 of them.
> > i suspect that there is something i am missing here
>
> every pin can be used for one of multiple functions.
> E.g. instead of using a pin for SPI, you can use it as IO as well.
>
> Have a look into user manual of LPC2148:
>
> http://ics.nxp.com/support/documents/microcontrollers/pdf/user.manual.lpc2141.lpc2142.lpc2144.lpc2146.lpc2148.pdf
>
> Especially chapter 5 and 6 are important for this topic.
>
> Example: Look at page 50. There you see on top left pin 1
>
> "P0.21/PWM5/CAP1.3"
>
> It can be used as GPIO P0.21 or PWM5 or CAP1.3.
>
> Look at page 61. There you find P0.21 in the table and
> see what functions are possible for this pin.
>
> Best regards,
>
> Martin
>
thank you so much mate ,very helpful.

it will be so nice if you can tell me from where i can acquire the type of skills you used to answer my question.

for example , from where i can read the stuff that let me answer questions like the following:
1- why the ports(in the "

--- In l..., "capiman26061973" wrote:
>
> Hello Essam,
>
> > so not too many I/O ports remain as a general purpose I/O ports ,
> > why there is so few ports compared to say
> > arduino mega which has 54 of them.
> > i suspect that there is something i am missing here
>
> every pin can be used for one of multiple functions.
> E.g. instead of using a pin for SPI, you can use it as IO as well.
>
> Have a look into user manual of LPC2148:
>
> http://ics.nxp.com/support/documents/microcontrollers/pdf/user.manual.lpc2141.lpc2142.lpc2144.lpc2146.lpc2148.pdf
>
> Especially chapter 5 and 6 are important for this topic.
>
> Example: Look at page 50. There you see on top left pin 1
>
> "P0.21/PWM5/CAP1.3"
>
> It can be used as GPIO P0.21 or PWM5 or CAP1.3.
>
> Look at page 61. There you find P0.21 in the table and
> see what functions are possible for this pin.
>
> Best regards,
>
> Martin
>
thank you so much mate ,very helpful.

it will be so nice if you can help me figure out from where i can acquire the type of skills you used to answer my question.

i.e. from where i can find the stuff that let me answer questions like the following:
1- why the ports are named "p0.21" instead of for example "p1" or "p01"
2- some ports are named "p1.02" instead of "p0.02" why ?
3- pin 1 "P0.21/PWM5/CAP1.3" you referred to earlier connect to which pin in the LPC2148 Prototype Board i mentioned in the previous posts.

i don't want answers to these question , rather i want to raise my level from "noob" to somewhere higher so that i can figure out the answers myself.

hope i am clear and thank you for your kind response :)

Hello Essam,

> i don't want answers to these question , rather i want to
> raise my level from "noob" to somewhere higher so that i
> can figure out the answers myself.

read in the user manual
and also look at the pictures inside user manual.

The user manual is the document where you
find almost all info about the chip itself.

And then it is a good thing to look at (source code) examples
and try to understand what each example is doing,
what registers are used and why they are used.
Accessing the GPIO (look for "blinky" or "gpio" examples)
is a good way to start. Once you see a blinking LED you got it !

Good luck on your way to next level !

Best regards,

Martin

--- In l..., "capiman26061973" wrote:
>

> Once you see a blinking LED you got it !
>hahaha ,i LOLed here too much.

thank you mate:)

--- In l..., "essam" wrote:
the type of skills you used to answer my question.
>
> i.e. from where i can find the stuff that let me answer questions like the following:
> 1- why the ports are named "p0.21" instead of for example "p1" or "p01"
> 2- some ports are named "p1.02" instead of "p0.02" why ?
> 3- pin 1 "P0.21/PWM5/CAP1.3" you referred to earlier connect to which pin in the LPC2148 Prototype Board i mentioned in the previous posts.
>
> i don't want answers to these question , rather i want to raise my level from "noob" to somewhere higher so that i can figure out the answers myself.
>
> hope i am clear and thank you for your kind response :)
>
There are 2 chip documens: the User Manual and the Datasheet. Get these from NXP.

The datasheet discusses phyical things like voltage levels and signal timing. This isn't nearly as useful as the User Manual.

The User Manual discusses the device and every component included. Why is there a P0.xx and a P1.xx? There are (2) 32 bit ports (P0 and P1).

When you read up on Pin Connect you will see how a single physical pin can be connected to multiple internal sources. A pin might be a digital IO, an analog input or something else depending on how it is programmed.

Table 60 is the beginning of the tables that show how ins are configured. For example P0.1 can be a general purpose IO, the receive signal for UART0, a PWM output or and external interrupt input depending on how it is programmed.

The User Manual is hard to read. It is BORING and terribly detailed! It is probably best to just skim through it quickly at first and then refer to specific sections as they are needed. I find myself printing out chapters while I set up a specific peripheral and then trashing the printouts after I have finished. At some point, every detail of the chapter will be important.

On 2 of my computers I have dual displays. This is very handy when programming because I can keep the User Manual open on one screen.

You will find that every board makes assumptions about the use of various pins. As a result, it may not be possible to use every feature of the chip due to the fact that external components are already connected. So, you need to verify that what you are attempting to do are even possible by referring to the board schematic. There are always limitations.

Richard

One thing to add,

if you are not familiar with this sort of configuration there is one
important consideration.

The device is CMOS, and with all CMOS devices you must not leave inputs
floating as this will cause currents to flow through the input transistors
that can ultimately damage the device.

When you have decided which pins you want to use don't just ignore the other
pins, ensure that all other pins are either programmed as outputs, analog
inputs, or have a pullup or pulldown enabled.

Most devices have selectable pullup / pulldown internally and one of these
must be selected for any pin that is not driven by some internal or external
source.

It should mention this somewhere in the HW reference manual, but it may not
as it is one of those things that it if often just assumed that designers
are aware of.

Regards

Phil.

From: l... [mailto:l...] On Behalf Of
rtstofer
Sent: 06 November 2011 00:02
To: l...
Subject: [lpc2000] Re: Where is the I/O ports in this LPC2148 Prototype
Board

--- In l... , "essam"
wrote:
the type of skills you used to answer my question.
>
> i.e. from where i can find the stuff that let me answer questions like the
following:
> 1- why the ports are named "p0.21" instead of for example "p1" or "p01"
> 2- some ports are named "p1.02" instead of "p0.02" why ?
> 3- pin 1 "P0.21/PWM5/CAP1.3" you referred to earlier connect to which pin
in the LPC2148 Prototype Board i mentioned in the previous posts.
>
> i don't want answers to these question , rather i want to raise my level
from "noob" to somewhere higher so that i can figure out the answers myself.
>
> hope i am clear and thank you for your kind response :)
>

There are 2 chip documens: the User Manual and the Datasheet. Get these from
NXP.

The datasheet discusses phyical things like voltage levels and signal
timing. This isn't nearly as useful as the User Manual.

The User Manual discusses the device and every component included. Why is
there a P0.xx and a P1.xx? There are (2) 32 bit ports (P0 and P1).

When you read up on Pin Connect you will see how a single physical pin can
be connected to multiple internal sources. A pin might be a digital IO, an
analog input or something else depending on how it is programmed.

Table 60 is the beginning of the tables that show how ins are configured.
For example P0.1 can be a general purpose IO, the receive signal for UART0,
a PWM output or and external interrupt input depending on how it is
programmed.

The User Manual is hard to read. It is BORING and terribly detailed! It is
probably best to just skim through it quickly at first and then refer to
specific sections as they are needed. I find myself printing out chapters
while I set up a specific peripheral and then trashing the printouts after I
have finished. At some point, every detail of the chapter will be important.

On 2 of my computers I have dual displays. This is very handy when
programming because I can keep the User Manual open on one screen.

You will find that every board makes assumptions about the use of various
pins. As a result, it may not be possible to use every feature of the chip
due to the fact that external components are already connected. So, you need
to verify that what you are attempting to do are even possible by referring
to the board schematic. There are always limitations.

Richard



--- In l..., "Phil Young" wrote:
>
> One thing to add,
>
> if you are not familiar with this sort of configuration there is one
> important consideration.
>
> The device is CMOS, and with all CMOS devices you must not leave inputs
> floating as this will cause currents to flow through the input transistors
> that can ultimately damage the device.
>
>
>
> When you have decided which pins you want to use don't just ignore the other
> pins, ensure that all other pins are either programmed as outputs, analog
> inputs, or have a pullup or pulldown enabled.
>
>
>
> Most devices have selectable pullup / pulldown internally and one of these
> must be selected for any pin that is not driven by some internal or external
> source.
>
>
>
> It should mention this somewhere in the HW reference manual, but it may not
> as it is one of those things that it if often just assumed that designers
> are aware of.
>
>
>
> Regards
>
>
>
> Phil.
>

thank you. as always helpful.