I need another serial port

16 Feb 2012

What are my options to add another serial port?

I have 5 peripherals running on the mbed1768. These are:

1. accelerometer SPI (p5-8) 2. SD card using SPI (P11-14) 3. GPS serial (p9,10) 4. Serial (p28-28) 5. LCD text display parallel (p21-26, 30)

I want to switch to a serial graphic display but do not have a free serial port. The PC(usbtx,usbrx) will not work with the display. Maybe I am doing something wrong but I can not get the output correct. I did connect a mini-usb plug to the display using both the D+ and D- connections (tried both) to the serial RX pin on the display with no luck. The scope just shows a high and low signal on the usb pins - no byte information is being transmitted.

Is there a way to setup a different virtual serial port?

Are there any LCD graphic displays that work on usb signals for p(D-/D+) pairs or the (usbtx,usbrx) pair?\

Does anyone have any suggestions on a way to get one more serial port? Can I reconfigure the analog IO pairs or the digital PWM-out pairs? Is there any example code? I tried this but could not get it to compile without errors.

16 Feb 2012

Hi James,

Can you run the SPI devices off the same port and just use different chip selects? That would free up a port.

16 Feb 2012

That is a thought I had not considered. Would be possible but not on the custom boards I had made. Might be time to solder in some jumpers and test it out. I would rather see if there is another pin that could be designated as a serial port.

Any digital IO pin pair should be capable of being assigned as a serial port. The question is how to get into the software to make that designation.

16 Feb 2012

Just saw this in another post related to I2C.

http://mbed.org/users/Lerche/notebook/lpc1768-pin-functions/

Looks like I might be able to try P25,26 pair as a serial port.

21 Feb 2012

if the baud is low, you can get away with bit banging a serial port.

http://supp.iar.com/Support/?note=88469

22 Feb 2012

You could have a go at porting this one, which supports up to 115k even on LPC11xx. Note that this implementation consumes two timers. Edit: fixed link.

22 Feb 2012

If you can add some hardware to your project you might consider using MAX3100 witch is a converter from SPI to UART. Take a look: http://pdfserv.maxim-ic.com/en/ds/MAX3100.pdf

22 Feb 2012

If your GPS is talking only,

And your LCD is listening only,

Then split the I/O

You should be able to set at least one device baud rate.

Hope this was useful

Ceri

29 Feb 2012

http://ics.nxp.com/products/bridges/i2c.spi.slave.uart.irda.gpio/

These devices will allow you to run multiple serial devices off of your i2c port.

02 Mar 2012

Yes, I thought to split the I/O. I only need the Input for the GPS when I run the config file. I can flash it to the RAM portion and then I do not need to reprogram.

However, the issue is the baud rate. I am running a 10Hz GPS and this needs 115200 baud. The display will only run at 9600. maybe another display can run at the faster speed.

Time to do more reading and then experiment.