0

I have been working on a project recently that is going to require more GPIO pins than the Raspberry Pi can provide. In order to add more I purchased a RPI-Hub module, though the data sheet says it must be programmed a certain way to use the pins as GPIOs and I have no clue where to start on that, as the data sheet provides little info about how it is to be programmed and used like this. Can anyone else figure this out? Here is a link to the data sheet:

http://www.mouser.com/ds/2/163/DS_RPi_HUB_Module-267627.pdf

I am working with a Raspberry Pi 3 Model B

1 Answer 1

1

This device is not trivial to use precisely because it is a USB device. There are much easier ways to get PIO expansion. This device has "GPIO" mode (called bit bang mode) but it is intended, primarily, to replicate custom communications protocol in a serial manner, not as a GPIO expansion. While it can certainly be used that way, it will be a big drag.

I would recommend using a different GPIO expansion product. SPI or I2C based devices are probably your best bet.

Regardless, EEPROM is not how you configure the device to do Bit Bang/PIO Expansion.


Details

All interaction with this device happens through USB. That means you need to use USB drivers and commands using USB libraries (like PyUSB in python) .

To use this device as a serial port, those drivers already exist in Linux, and should work out of the box. However, to access the low level features (and not just the Virtual COM Port), you may need to install The Drivers to access the low level command API.

Specifically there are a number of things referenced in the datasheet you link. Most of the information is buried in "Application Notes"

  1. Datasheet for the FTDI chip itself
    • Section 4.10 - Synchronous and Asynchronous Bit-Bang Interface Mode Description
  2. Application Note: AN2232-02 Bit Mode Functions for the FT2232
  3. API Reference: FT-71 D2XX Programmer's Guide
  4. Related Older Application Note: AN_232R-01 Bit Bang Modes For The FT232R and FT245R
  5. Example Code (Visual C++) Example 4 Is the Bit Bang Mode Example
  6. EEPROM Programming Utility: FT_PROG

Bit Mode

There are two modes - ASYNC Bit-Bang and SYNC Bit-Bang that enable these peripheral IO modes.

These bit-bang mode Do not require EEPROM Interaction as shown in the table below, they are accessed through the driver command API.

enter image description here

The relevant API Calls Appear to be

  • FT_SetBitMode
  • FT_GetBitMode
  • FT_Read
  • FT_Write

EEPROM

Even though you do not need to access EEPROM for your question, this may still be useful. EEPROM is used to configure the FTDI chip as a custom product (e.g. set the Product Code and Vendor ID, etc.)

enter image description here

EEPROM is accessed through utility provided by FTDI called FT_PROG

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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