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
You need to log in to post a comment
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?