Subject: Re: ft4232h & control of peripherals
> If I can configure the device as per items 1,2 & 3 above using
> libftdi then this should solve my problems. From looking at the code it's
> not clear how I can do this, though. If anybody else out there could give
> me a few pointers I'd very much appreciate it.
To configure the MPSSE for I2C you basically have to:
1) Put the FTDI chip into MPSSE mode using ftdi_set_bitmode()
2) Configure the MPSSE clock frequency
3) Enable the 3-phase clock
4) Configure the DO/DI/SK pins as inputs/outputs
5) Ensure that when you send data you set the MPSSE_WRITE_NEG bit, and clear
that bit when reading
6) After each byte you read/write send a single clock bit for the ACK/NACK
There are a few other details, like ensuring your I2C start and stop
conditions are properly met and I'm sure a few others that I'm forgetting at
the moment. Libmpsse uses libftdi to do SPI and I2C, so you can look at that
code for an example (http://libmpsse.googlecode.com). The I2C examples on
FTDI's Web site are also good.
View this message in context:
Sent from the libFTDI mailing list archive at Nabble.com.
libftdi - see http://www.intra2net.com/en/developer/libftdi for details.
To unsubscribe send a mail to libftdi+unsubscribe@xxxxxxxxxxxxxxxxxxxxxxx