Anyone playing with the FT311D yet?

Anything not related to a specific project.

Anyone playing with the FT311D yet?

Postby whileLoop » Mon Oct 22, 2012 10:45 am

I got the eval board from FTDI, and got it working in GPIO mode pretty quickly. Now I'm working on I2C and having some issues (nothings ever easy right).

Anyone else out there interested in this chip?
whileLoop
Newbie
Newbie
 
Posts: 6
Joined: Wed Mar 07, 2012 10:06 pm

Re: Anyone playing with the FT311D yet?

Postby Sjaak » Mon Oct 22, 2012 11:38 am

yes we are interested, but we are waiting for general availability of the chips.

besides the i2c trouble what is the verdict?
User avatar
Sjaak
Fellow
Fellow
 
Posts: 3001
Joined: Sun Jan 03, 2010 2:45 pm
Location: Hiero

Re: Anyone playing with the FT311D yet?

Postby stealth » Wed Nov 14, 2012 1:59 pm

Hello whileLoop. I'm also interested in this chip. I connected FT311 Dev Board put it into GPIO mode (jumpers). Then I powered the device on and ran the GPIODemoActivity from FTDI, but it does not work. Red LED is always powered on. I believe this means: Device not responding. Do you maybe have any hint on how to make it to work? Thank you.
stealth
Newbie
Newbie
 
Posts: 2
Joined: Wed Nov 14, 2012 1:51 pm

Re: Anyone playing with the FT311D yet?

Postby whileLoop » Wed Nov 14, 2012 2:23 pm

Solid red LED means the device is connected properly. The code provided by FTDI is a bit sloppy and possibly broken. I Will post my code later when I get home. When you connect your phone, it may prompt you about connection type depending on the version of android on the phone. You want to connect as a media device (MTP), same as a you would if were to connect as a USB storage device. If the connection is successful the top bar on the android should say something like "Connected to USB Accessory". At this point if there are any programs with intent filters matching the string descriptors sent by the dev board, that program should automatically open, otherwise a popup will appear saying there are no matching programs.

Also, make sure you power the board with a proper power supply. The board will supply 500mA to the phone and consume another 100mA so you need to be able to supply at least that much current without getting loaded down. A standard computer USB port will not be able to handle that load.
whileLoop
Newbie
Newbie
 
Posts: 6
Joined: Wed Mar 07, 2012 10:06 pm

Re: Anyone playing with the FT311D yet?

Postby whileLoop » Wed Nov 14, 2012 10:46 pm

I used the OpenAccessoryTest project from here: http://www.duinodroid.com/android. Look for OpenAccessoryTest.zip
Once you import the project change the strings in res/xml/accessory_filter.xml to match the ones sent by the ft311. Then replace the contents of the method sendMessageToArduino with ft311 code.

This code is more or less copied from the FTDI example code.

Code: Select all

   /*configure data*/
   public void configPort(byte configOutMap, byte configINMap){
      byte[] writeusbdata = new byte[4];
      
      writeusbdata[0] = 0x11;
      writeusbdata[1] = 0x00;
      writeusbdata[2] = configOutMap;
      writeusbdata[3] = configINMap;
      
      
         try {
//            if(mOutputStream != null){
               mOutputStream.write(writeusbdata);
//            }
         } catch (Exception e) {
            log("Send failed: " + e.getMessage());
         }
      
   }
   
   /*write port*/
   public void writePort(byte portData){
      byte[] writeusbdata = new byte[4];
      
      writeusbdata[0] = 0x13;
      writeusbdata[1] = portData;
      writeusbdata[2] = 0x00;
      writeusbdata[3] = 0x00;
      
         try {
//            if(mOutputStream != null){
               mOutputStream.write(writeusbdata, 0,4);
//            }
         } catch (Exception  e) {
            log("Send failed: " + e.getMessage());
         }
   }


whileLoop
Newbie
Newbie
 
Posts: 6
Joined: Wed Mar 07, 2012 10:06 pm

Re: Anyone playing with the FT311D yet?

Postby stealth » Thu Nov 15, 2012 12:24 am

whileLoop: Thank you for your help. I believe there is really a little problem with FTDI code. I played a little bit, and was able to do application with UART communication, but communication only worked if I connected Tx and Rx directly on a board. If I connected external device to it, it did not work anymore. Actually it worked for one short period, but then it stopped. I have to investigate a little bit more to find a problem.

By the way, did you found a way how to change strings inside FT311 device? There is a FTDI software, but no information where to connect, and which cable to use. I'm using FT311 Dev board from FTDI, which by default uses its own strings, but I would like to change them to do some more further tests.
stealth
Newbie
Newbie
 
Posts: 2
Joined: Wed Nov 14, 2012 1:51 pm


Return to General discussion