Tuesday, March 18, 2014

TTL to USB

You will need an interface to your computer if you plan to use our LPC1114 board with Forth for fun and profit. I will be writing up the '1114 in the next few days. In the mean time you can start building an interface to your computer. You can use the RS232 board if you are trying to talk to and program it with an older computer.

Or you can build the TTL to USB board if you have a more modern computer which only has USB ports. The USB board uses the FT232RL chip. Soldering the board is straight forward. So I'm not going to go into that. I will just mention that FTDI does not recommend using the Blue and White LEDs you can mount on the board in the way I use them (connected to the 5 volt supply with a 3.3 volt interface voltage). So if you mount them it is at your own risk.

Of course you are going to need some documentation to put a board together. You can get the schematic, parts list, and parts layout here. You can buy the boards from OSH Park. The price is $7.10 per board.

To communicate through the USB board you will need a terminal program. There are a number of them out there. I'm going to describe some of them. The links provided go to review pages where you can find a download link. For beginners I like Tera Term. It is easy to use. On the con side it hides the screens that you might want to play with while setting up or just watching what is going on.

For the more advanced user I would suggest RealTerm. It has everything you need but the screens will be confusing to the novice. Its specialty is binary files and difficult data.

The guys at Green Arrays like putty which is open source.

To make these programs work you will need to find out the port number of the USB port you have plugged into. Please note that the board is as the FTDI people refer to it "self powered". You will need to provide it with a power supply of at least 100 ma. I have designed a number of these for use with our system. I describe one power supply at Power Supply Digital WW. There is also a link there to a heftier supply. Note that the "WW" refers to the power transformer, which is a wall wart.

So you have your board powered up and plugged in to a USB port. How do you locate the port number? Assuming you have a Windows 7 system (I'm sorry to say I'm ignorant of Macs) go to the main Control Panel page and click on "Hardware and Sound" then "Devices and Printers". Under "Unspecified" you will see "FT2232R USB UART". Right click on the icon and you will get another (small) page. Click on "Hardware" on that page. Under "Device Functions" you will see listed your USB port. Mine says "USB Serial Port (Com5)". So "Com 5" is my port number. Your board should work with any Com Port number, but I think I read somewhere that port numbers from 1 to 5 work better in some systems. Keep plugging in your USB board until you find a good number if you are having trouble. Once you know your port number you will be ready to set up your terminal according to the instructions provided by the terminal program.

Initially when you plug the USB board into your PC it will go looking for a device driver. This can take a while. Your USB board will not show up on the device driver page until your system has a driver for the FTDI Chip. The last time my computer went looking for a device driver for the FTDI232R it took something like ten minutes for the driver to be found and installed. Get a cup of coffee. Come back. And then assist (if needed) with completion of the process.

And there you have it. You are ready to go with what ever else you plan to get up to.

Engineering is the art of making what you want from what you can get at a profit.

No comments:

Post a Comment