0
\$\begingroup\$

I have a qapass 1602a LCD display connected to an I2C 1602 LCD Controller which is connected to a UMFT201XB I2C USB Connector which is connected to a linux box.

My Question is: How and where do I get started to sending data to the display?

I installed the D2XX driver from ftdichip on the linux box and the output of the example EEPROM ./read command looks like this:

enter image description here

All the tutorials and infos I can find are for the Arduino, but I can't find anything on how to use the USB connector.


Here a picture of the setup:

i2c linux box with lcd display

\$\endgroup\$
2
\$\begingroup\$

You have a display module that is controlled via I2C interface. Then you have a USB-to-I2C bridge controlled from USB end. How to start?

First, you need to study the set and format of I2C commands that are needed to display something. It should be in the user manual for the display controller.

Second, you need to figure out the USB format that converts USB into I2C, to generate proper I2C strings. Usually USB-to-I2C devices come with a library of proper I2C calls, so you don't need to study physical interface. But you will need to understand the format of library calls. Just a FTDI driver does nothing to help here, it is just a driver. You need an application-layer I2C library to send proper USB packets, which will be transformed into I2C packets at the other end of FTDI bridge. Consult with Appnote AN_255 about details of how to initiate the process.

Then you will have a challenge to generate correct I2C commands that the display will understand, using those USB-I2C libraries. The best way to ensure correct bits and bytes is to monitor the actual I2C bus activity with a simple logic analyzer with I2C protocol decoder, like Saleae analyzers. You can get cheap clones of their older versions on e-Bay or DX.com,

enter image description here

If the datasheet for the display is unclear (as it usually is), a good strategy would be to get an Arduino native I2C tutorial and demo, and capture correct I2C sequences, and then master the USB calls to match the I2C output. It might save you a lot of development time.

EDIT: It looks like the format of Funduino controller (from I2C to parallel 1602A display interface) is not disclosed. So the only way would be to reverse engineer the "LCD Arduino (tm) Library" from circuitattic.com, and write the USB (con)version of it.

\$\endgroup\$
1
\$\begingroup\$

If you are just getting started, then I'd recommend that you install the virtual comport drivers from FTDI instead of the D2xx drivers.

If the VCP driver from FTDI installed properly, then a virtual comport should be available for you to read/write to.

You will need to look through the logs to find which com port it is using. Look for log file changes when you plug the USB adapter into your computer's USB port.

Then there are the typical problems with read/write permissions to the port (google). Set/confirm the permissions allow you to both read and write the port. The port should have the form of /dev/ttyS1, or something like that.

With your own code, you would open the virtual serial comport, then read/write I2C data to your display via the newly opened port.

Using a comport is simple, and is easily accessible for new projects (say, via a python script, with the 'serial' module).

Once you have familiarity with the setup, you could then also write code for the D2xx drivers, which could be more tightly bound to your application.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.