mbed USB breakout

I'm coming to the end of my final year uni project and want to migrate from the mbed to my own PCB using the LPC1768. One problem this causes is that the lovely USB port that I have been using to communicate with hyperterminal will no longer be available. So I need an alternative...

This lead me to the FT232RL chip. I picked this mainly because it is already in Eagle and stocked by Farnell. After ordering in the IC (£3.55) an adapter board (SSOP-28) and a type B USB socket I set about wiring it all up.

Reading through the datasheet I setteled on the self powered arrangement shown below.

This allows the FT232RL chip to take power from the rest of the circuit and not the USB bus. I wired up the circuit from the above diagram and after a bit of work to find out which pin of the USB connector was which I was ready to test. A photo of my rather dodgy wiring is shown below...

I then loaded a quick hello world program onto the mbed using pins 9 & 10 to send the USB data to the FT232RL. The code is...

#include "mbed.h"             

Serial pc(p9,p10); // tx, rx

int main() {
    pc.printf("Hello World!\n\r");
}

I then find when I plug the cicuit into the PC and power it up Windows pops up with the "Found new hardware" box. OK I select install drivers from the internet and a few seconds later I have a USB devive. OK time for the acid test, I load up hyperterminal and select COM 6 (the one I guess is my circuit), press the mbed reset button and get...

Success!!!! First time too.OK time to see what this chip can do. I slowly start increasing the Baud rate, 19,200 115,200 and its still working... 460,800 still OK finally 921,600 still working!

Seems that this chip is fine for what I want to do, and even with my bad wiring can still get to the top Baud rate.

I hope this helps anyone who wants more comm ports for the mbed or is (like me) trying to move from mbed to custom PCB and still wants USB comms.


9 comments

14 Feb 2010 . Edited: 14 Feb 2010

I don't see it on the Schematic, but i am assuming you connected the MBED pins (9,10) to TXD, RXD om the FT chip? If not, which pins did you connect it to?

14 Feb 2010

Hi Sean, Yes I conected pins 9 & 10 to those FT232RL pins.

14 Feb 2010

Martin,

If you make your own PCB I don't fully understand the point with the FT232RL chip since you already have USB support in the LPC1768.  Yes, you need to add a USB serial software driver but hopefully NXP has one to offer.

Anders

15 Feb 2010

Anders,

I spoke to Chris at ARM about this and he said that the hardware does exsist in the LCP1768 as you suggest, but the software side of it doesn't.

Maybe someone on the mbed team can clear this up?

Martin

15 Feb 2010

Martin,

I have not digged particularly deep but this is what I came up with:

General stuff:

http://ics.nxp.com/support

 

Something that looks like USB drivers but probably requires a lot of work:

http://ics.nxp.com/support/documents/microcontrollers/zip/code.bundle.lpc17xx.keil.zip

Anders

15 Feb 2010
Anders Rundgren wrote:

Something that looks like USB drivers but probably requires a lot of work:

http://ics.nxp.com/support/documents/microcontrollers/zip/code.bundle.lpc17xx.keil.zip

Anders

Anders,

Frankly this level of software engineering is beyond me, hence I'll stick with the extra IC but accept that there is another way of doing it.

Martin

15 Feb 2010

Martin,

I understand your concerns fully.  I'm personally a bit sceptical about running MBED code "as is" in another HW platform due to its ties to the secret controller chip.

Don't get me wrong; I *love* the MBED concept, but production and prototyping tend to live separate lives :-)

Anders

01 Dec 2015
Alternate method (serial comm on LPC1768) : Use a USB-TTL cable and connect p9(TX) to yellow wire(RX) of Cable and p10(RX) to orange wire (TX) [black wire of cable is ground] and then check output on terminal.
01 Dec 2015
Thanks Martin

You need to log in to post a comment