Saturday, April 14, 2007

Simple USB LCD

In this post I will describe a simple way to add a LCD (HD44780 based) to a computer via USB. Besides a LCD the only component needed is a FTDI FT245-chip (or any other FTDI-chip that supports asynchronous bit bang mode). These can either be bought unsoldered for $4 if you have the means to manually solder it (empty breakout board is $3), or they can be bought presoldered on a breakout board with USB connector for $15. You'll also need a USB cable for about $2. All prices are from Spark Fun Electronics. If you live in Europe (I'm from Sweden) you can get FTDI-chips from Lawicel or Farnell, they both have low shipping costs. If you have access to etching equipment you can easily make the breakout board yourself and save some money. Here´s an 600dpi etch mask for a SSOP-28 breakout board (it can be made smaller, this was just a quick auto routing in Eagle):

Once you have your FTDI-chip mounted on the breakout board, connect the FDTI-chip to the USB-cable in the simple bus-powered configuration (see FT245 datasheet) and connect the LCD to the FTDI-chip as follows (NC= not connected):

FTDI: D7 D6 D5 D4 D3 D2 D1 D0

Here are some photos of my test setup:

Install the D2XX drivers from FTDI and you´re good to go! I've made a sample application that prints text to the LCD using the D2XX drivers, you can get it from Google code:

D7 (and optionally D4) can be used for general purpose I/O (buttons or whatever). There are FTDI drivers for Linux, Windows and Mac OS and bindings for C/C++, C#, Java, etc, so it should be easy to make it work cross platform. It would be nice if someone wrote the code needed to make it work in common LCD programs like LCDproc, LCD4Linux, etc. Please let me know in that case :)

Some LCD links:
Nice LCD FAQ , User defined graphics , HD44780 code from LCDproc


cyberwindeo said...

FTDI agent in Hongkong . email:

sonic said...

Thanks for sharing this!
I ported it to libftdi.

Lars Englund said...

Nice, thanks for sharing! :)

Hiroki Mori said...

I modifyed for Mac OS X and Graphic LCD. Thinks for your code.

Lars Englund said...

Sweet, thanks for sharing!