Serial Port Identity

11 Dec 2009

How do I match the mbed serial port designations (p28,p27 etc) with the LPC1768 UART names (UART0 etc)?

12 Dec 2009 . Edited: 12 Dec 2009

Hi John,

You basically need to map the ports on the micro through to the peripherals. The mbed mapping to LPC1768 ports is in the table below:

p5 = P0_9
p6 = P0_8
p7 = P0_7
p8 = P0_6
p9 = P0_0
p10 = P0_1
p11 = P0_18
p12 = P0_17
p13 = P0_15
p14 = P0_16
p15 = P0_23
p16 = P0_24
p17 = P0_25
p18 = P0_26
p19 = P1_30
p20 = P1_31
p21 = P2_5
p22 = P2_4
p23 = P2_3
p24 = P2_2
p25 = P2_1
p26 = P2_0
p27 = P0_11
p28 = P0_10
p29 = P0_5
p30 = P0_4

LED1 = P1_18
LED2 = P1_20
LED3 = P1_21
LED4 = P1_23
USBTX = P0_2
USBRX = P0_3

All the available port to peripheral mappings are listed in the LPC1768 user manual, see:

Note, the same peripheral may pinout in multiple places.

Maybe there is away to capture all this peripheral mapping information in a table or alike to make a nice reference? Any ideas on what would present the information you need in a practical way would be welcome.

Simon

17 Dec 2009

Thanks Simon.

I'm using Chris Styles plan for Prototype to Hardware to port and upgrade some LPC2103 projects to the LPC1768, but I'm planning to do this in three steps. (1) Main PCB with socket for mbed module. (2) LPC1768 only module to replace mbed (3) New main PCB with LPC1768 built in.

The 'Main PCB' has a FPGA and some I/O stuff on it.

I have written and tested some of the code require using the mbed libraries and compiler with TXD0 and RXD0 as my ASCII communication port. Problem is I cannot do ISP for step (2) using Flash Magic unless I at minimum install a USB socket and the associated Rs and Cs on the 'LPC1768 Only' module. I can do that but what about the Virtual Comm Port USB driver for the PC link to Flash Magic? Can I use a driver that is part of the mbed tool kit?

Why am I going to all this trouble? The two key features for jogging me into the LPC2103 to LPC1768 migration are NVIC and QEI. Unfortunately the three pins required for QEI P1.20, P1.23, and P1.24 are not pinned out on mbed. My solution is to add a 5-pin connector and a 74LS14 as the encoder interface at the opposite end of the 'LPC1768 Only' module to the end used for the mbed USB connector.

If the VCP USB driver issue is not too hard, and I get my 'LPC1768' Only module built, then I will be asking how do I implement QEI with the mbed  libraries and compiler?

Thanks for any help you can provide.

John