OK, so it's not a definitive review, as I just unpacked the eval board today, and just a moment ago got communication working, but still.
The FT201X is one of FTDI's cute new chips, in this case a USB-to-FIFO bridge with an I2C interface to the FIFO.
After a couple of iterations, the datasheet made enough sense last month for me to order the eval board and start designing the thing into my new line of gadgets, on the assumption that it was going to prove wonderfully useful.
So here's what I've got:
First, the datasheet is still confusing on a couple of points, specifically the interpretation of the I2C address as stored in the configuration memory, and the meanings and usage of the I2C_TXE and I2C_RXF status signals which are available on the CBUS pins.
The I2C address is represented sans R/W bit, so if you're in the habit of using even addresses that include that space at the bottom, just remember that setting the I2C address to 0x22 means that the bus needs to see 0x44 or 0x45, according as you're writing or reading.
As for the FIFO status signals, well, Transmitter Empty and Receiver Full don't seem like really useful indications, do they? And, as it turns out, they actually Do What You Want, regardless of the name: TXE goes LOW when there's space in the outbound FIFO, that can be written via I2C, while RXF goes LOW when the inbound FIFO contains data for the MCU to read via I2C.
The CBUS functions (and sundry other things that I haven't worried about yet) can be set using the usual FTDI programming utility which, alas, remains Windows-only. There's a third-party utility which may or may not be capable of reading & writing the config memory, but it doesn't have a nice GUI for selecting the desired values (and seems to need some mucking about to make it do anything useful).
Other functions available on the CBUS pins are conducive to building USB-powered devices, including those with battery chargers. I haven't tested any of this yet.
And on the USB side of things? Well, plug it into a Windows XP machine, and you'll get the "may I look for a driver" prompt, and Windows will find the driver, and all will be ready for use. Plug it into a current Linux machine, and, with no fuss at all, it's a comm port (/dev/ttyUSB1 or similar).
And why not just use a real comm port bridge? Multiple reasons. For one thing, the FT201X approach only uses up an I2C bus address and a couple of GPIO pins, rather than an entire UART. For another, forget Baud rates. For a third, trivially easy flow control.
Update 1: Ord Millar asks an interesting question: what happens if you try to read when the FIFO is empty, or write when it's full? He also provides an initial answer: trying to read when the FIFO is empty results in no ACK pulse, hence an I2C bus error. Which, when you come to think of it, is what you'd hope for.
Yet to be tested: writing to a full FIFO, and block reads/writes on a partial FIFO - as in: does it stop ACKing transfers at the apropriate point?
This is useful information; one might reasonably want to hook the FIFO status signals to interrupt-request pins, and have the interrupt trigger a block transfer, stopping on bus error and recording the number of bytes successfully transferred.
Recent Comments