Using the library with FT232H - custom pinout

82 views
Skip to first unread message

Alex Stefan

unread,
Jun 27, 2011, 4:17:05 AM6/27/11
to libftdispi
Hello,

I am currently working on a project involving SPI communication using
a FT232H chip. I found the libftdispi library and thought that it
should fit perfectly for my project. The problem is that the pin
connections between the chips are not done according to the MPSSE
pinout in the datasheet:

ACBUS5 (29) -> SCK
ACBUS8 (32) -> MOSI
ACBUS6 (30) -> MISO

Is there anyway that I can use your library with this pinout or I need
to go with bit banging as the only solution?

Thanks,
Alex

Stany MARCEL

unread,
Jun 27, 2011, 4:42:37 AM6/27/11
to libft...@googlegroups.com
Hello Alex,

The pin are predetermined for MPSSE mode and I think that they can't
be rerouted like in a PIC (or I don't know how to do it).

The only solution might be a bit banging mode if you want to add this
feature to libftdispi librairy your contribution is welcomed.

Regards,

Stany

Alex Stefan

unread,
Jun 27, 2011, 4:57:18 AM6/27/11
to libftdispi
Thanks for the reply.

After I will be finished with the project I will surely post it as a
contribution to this library.

Alex

Alex Stefan

unread,
Jul 26, 2011, 5:50:03 AM7/26/11
to libftdispi
I have finished the project and the CBUS SPI works, but with some
limitations due to the way USB communication works.

To receive/transmit one bit on SPI, 3 operations must be made on the
FTDI output pins: 2 pin sets and 1 pin read. Each of the 3 operations
requires a separate USB microframe to be sent from the host to the
FTDI chip. Sadly, the minimum time between 2 USB microframes is 125
us. So, to sum it all up, to read/write 1 byte on SPI we need minimum:
125 us (time required for one operation) * 3 (operations for one bit)
* 8 (bits in a byte) ~= 3 ms. That comes to about 300 B/s, which is
quite low.

Just tell me how to send the code.

Alex

Stany MARCEL

unread,
Aug 25, 2011, 2:39:06 AM8/25/11
to libft...@googlegroups.com
Hello,

Sorry for my late reply,

You could send me a patch when I'll have more available times I'll
review and test it.

Regards,

--
Stany

Reply all
Reply to author
Forward
0 new messages