The mbed-enabled LPC4088 QuickStart Board from Embedded Artists is a easy to use ARM Cortex-M4 rapid prototyping board in a standard through hole DIP package (44-pin), targeted at high-performance as …

Additional I2C and UART ports in LPC4088

12 Jan 2014

Hi,

I would like to use LPC4088 for a robotics project and I need 2 I2C and 1 UART. But in the Pin Usage picture, the two normal UARTs use the same pins as the I2Cs. So I would like to evaluate some different approaches;

1) Use 1 UART or 1 I2C from the Xbee interface ? Do I have to change something to the mbed library ?

2) Use pins not listed as UART or I2C in the pin usage picture, ie p19,p20 (I2C0) or p17,p18(UART3) ? Do I have to change something to the mbed library ?

3) Use HDK UART ? Can I use this disabling only the serial port functionallity while keeping the HDK interface active for flashing and debugging ?

Thanks in advance, Jadas.

12 Jan 2014

There are several options.

  • You may be able to connect both I2C devices to the same port if they can have different I2C addresses.
  • You can use a soft I2C controller on any GPIO. (some people call it bit banged)
  • You can add an analog switch multiplexer like the MAX4618 which is still available in DIP package.

UART2 at the XBee connector may be the simplest solution, but the UART how to says you can override the HDK UART. http://mbed.org/users/embeddedartists/notebook/lpc4088-quickstart-board---how-to-expand---uart/

Their example interface design schematic suggests adding a series resistor if you try to use the HDK UART. http://mbed.org/media/uploads/embeddedartists/lpc4088qsbinterfaceexamples_revpa1.pdf

12 Jan 2014

Greg Steiert wrote:

There are several options.

  • You may be able to connect both I2C devices to the same port if they can have different I2C addresses.
  • You can use a soft I2C controller on any GPIO. (some people call it bit banged)
  • You can add an analog switch multiplexer like the MAX4618 which is still available in DIP package.

UART2 at the XBee connector may be the simplest solution, but the UART how to says you can override the HDK UART. http://mbed.org/users/embeddedartists/notebook/lpc4088-quickstart-board---how-to-expand---uart/

Their example interface design schematic suggests adding a series resistor if you try to use the HDK UART. http://mbed.org/media/uploads/embeddedartists/lpc4088qsbinterfaceexamples_revpa1.pdf

Thanks for the answer.

I should have clarified that I want 2 I2Cs because of conflicting addresses. Also, the uC will be in very tight place, so I would avoid external devices. As for a software solution, I think it may be easier to use the three methods I mentioned.

The resistor used in HDK UART is just a safety measure in case I accidentally use a printf() ?

Anyway I would prefer to use solution 2) if possible , because that leaves xbee and virtual serial port available. In i2c_api.c and serial_api.c of LPC4088 target p19,p20 (I2C0) or p17,p18(UART3) are listed in Pinmap structure, but I would like to know if they work out of the box, as I don't understand the code completely yet.

12 Jan 2014

I haven't got the LPC4088 myself, but on other platforms they almost Always only list one set of pins per peripheral, I think to prevent people from trying to use several sets at the same time. But it should just work if they are listed in the code.

14 Jan 2014

Erik - wrote:

... time. But it should just work if they are listed in the code.

As I don't fully undertand the code , it could be just a stub, I don't know if it is implemented in user level. May a different iniatilization routine is required or somehow mbed functionallity is affected.

16 Jan 2014

Anyone tried using different ports than the ones in the picture ? I can't find any reference neither in documentation nor by searching mbed site for "LPC4088"

Regards, Jadas.

16 Jan 2014

Why don't you just try using them? All the ones in the pinmap structure should probably be usable.

17 Jan 2014

Erik - wrote:

Why don't you just try using them? All the ones in the pinmap structure should probably be usable.

Sorry, I should have clarified that I don't own one yet, it would be good to know before I buy it.

17 Jan 2014

Not owning one I of course cannot give you 100% guarantee it works, but for example the KL25 pinout: http://mbed.org/handbook/mbed-FRDM-KL25Z

Compared with the actual SPI connections: http://mbed.org/users/mbed_official/code/mbed-src/file/64ad953ee6c3/targets/hal/TARGET_Freescale/TARGET_KL25Z/spi_api.c

Now on the KL25 they mainly show connections relevant to the arduino pinout, but even if they wanted to show all, it just wouldn't fit on the picture. I do own a KL25, and used enough of the other SPI connections, works fine :)

07 Dec 2014

@Jadas Did you manage to get the I2C0 port working on p19, p20?

06 May 2016

bump this old thread, is it possible to use I2C on p10 and p20 on the LPC4088 QSB ?

20 May 2016

considering https://developer.mbed.org/platforms/EA-LPC4088/

the most simple is to use P9/P10 or P31/P32 with I2C on LPC4088...