[Lcdproc] support for the ft245B in hd44780-ftdi
Ismail Ibrahim
whirleyes@gmail.com
Sat May 3 06:10:02 2008
hello all
To make thing simple, I modified the driver this way.
4 bit driver still lack of backlight control.Hope somebody try to implement it.
Here are some documentation of the new ftdi driver
//simple documentation
HD44780 - ftdi
The FTDI chip support bit bang mode in 8 bits.
Some chip even have dual controller so it doubles to 16 bits.
FTDI chip
-----------------------------------------------------------------------
| Single Channel | Dual Channel |
|-------------------------------- ------|------------------------------|
| FT245x x={BQ,BL,BM,R} | FT2232x x={D,L,C} |
| FT232x x={BQ,BL,BM,R} | |
-----------------------------------------------------------------------
=================
FTDI Driver mode
=================
8 Bit mode (Default).
The HD44780 is driven in 8 bits using the first channel(A)
and using the second channel(B) for controlling the RS,RW,E and backlight.
4 Bit mode (need to define ftdi_mode=4 in LCDd.conf)
Requires only one channel of the bit bang mode.The HD44780 will be
driven in 4 bits mode.
4 bits of the bit bang mode are for data and other 3 will be used for RS,RW,E.
The extra 1 bit can be use for controlling backlight,key..etc
======
Pinout
======
FTDI Bit-Bang Pinout
-----------------------------------------------------------
| Bit-Bang | FT245x | FT232x | FT2232x |
-----------------------------------------------------------
| Data0 | D0 | TXD | *DBUS0 |
| Data1 | D1 | RXD | *DBUS1 |
| Data2 | D2 | RTS | *DBUS2 |
| Data3 | D3 | CTS | *DBUS3 |
| Data4 | D4 | DTR | *DBUS4 |
| Data5 | D5 | DSR | *DBUS5 |
| Data6 | D6 | DCD | *DBUS6 |
| Data7 | D7 | RI | *DBUS7 |
-----------------------------------------------------------
for FT2232x, * is the channel(A/B)
==============
Wiring example
==============
I.8 Bit Wiring(Dual Channel)
----------------------------------------------------------------------------
| Channel A || Channel B |
----------------------------------------------------------------------------
| Bit-Bang | HD44780 || Bit-Bang | HD44780 |
----------------------------------------------------------------------------
| Data0(0x01) | D0 || Data0(0x01) | RS |
| Data1(0x02) | D1 || Data1(0x02) | RW |
| Data2(0x04) | D2 || Data2(0x04) | EN |
| Data3(0x08) | D3 || Data3(0x08) | BL |
| Data4(0x10) | D4 || Data4(0x10) | Not Use |
| Data5(0x20) | D5 || Data5(0x20) | Not Use |
| Data6(0x40) | D6 || Data5(0x20) | Not Use |
| Data7(0x80) | D7 || Data5(0x20) | Not Use |
----------------------------------------------------------------------------
no need to define anything.The driver is default to this set of wiring
II.4 Bit Wiring(Single Channel)
--------------------------------------
| Bit-Bang | HD44780 |
--------------------------------------
| Data0(0x01) | D4 |
| Data1(0x02) | D5 |
| Data2(0x04) | D6 |
| Data3(0x08) | D7 |
| Data4(0x10) | EN |
| Data5(0x20) | RW |
| Data6(0x40) | RS |
| Data7(0x80) | Not Use |
-------------------------------------
For this set of wiring schem, we need to define
ftdi_mode=4
ftdi_line_RS=0x40
ftdi_line_RW=0x20
ftdi_line_EN=0x10
in LCDd.conf
And of course,If you wire your LCD in the different way,
just define the appropriate Databit corresponding to RS,RW,EN
//
Some wiring pictures in http://pixca.net/2008/01/30/hd44780-ftdi-usb-lcd/
Thanks