FTDI Community

Please login or register.

Login with username, password and session length.
Advanced Search  

News:

Welcome to the FTDI Community!

Please read our Welcome Note

Technical Support enquires
please contact the team
@ FTDI Support


New Bridgetek Community is now open

Please note that we have created the Bridgetek Community to discuss all Bridgetek products e.g. EVE, MCU.

Please follow this link and create a new user account to get started.

Bridgetek Community

Show Posts

You can view here all posts made by this member. Note that you can only see posts made in areas to which you currently have access.

Messages - ffred

Pages: [1] 2
1
Discussion - Software / Re: FT260 and LibFT260, using Interrupts
« on: March 01, 2024, 07:32:04 AM »
Hi,
just to report informations about some tests I did (after a long pause on my FT260 project..) on a small dev board. I put a UMFT260EV1A on it, with a MCP23008 I/O expander connected to 4 buttons and 4 Leds and I connected the MCP23008 INT pin to GPIO3 (INTRIN/WAKEUP) of the FT260.

I had to activate the two HID ports, for I2C & UART, because with only the I2C it wasn't working.. (so the DLL is really using the UART to read the interrupt flag)

so, from LibFT260, I used FT260_UART_Init, FT260_SetInterruptTriggerType, FT260_SetWakeUpInterrupt , then FT260_I2CMaster_Init.
after that I send the config to the MCP23008 to activate the interrupt in open drain mode when I push a button.
and then I could use F260_CleanInterruptFlag to see if an interrupt occured and set a Led ON. and it worked !  ;D

so the Interrupt flag can be used.

2
Discussion - Software / Re: FT260 and LibFT260, using Interrupts
« on: April 14, 2023, 12:23:36 PM »
Hello,
thanks for replying but it's still less clear for me..
the LibFT260 DLL is not made for "USB to HID-over-I2C Bridge" but for "USB to I2C (and/or UART) master controller". so why is there 4 interrupt functions in this DLL if the interrupt can't be used ?? how to use those functions ?

what I understand when reading AN395 is that it probably can't be used as a "real" interrupt but it could be used to see (by reading the interrupt flag > function "FT260_GetInterruptFlag") if an interrupt condition as been encountered.
I will try it later like that (can't set a test board right now), but since it's not really clear in the doc that's why I asked here before.. and what made it less clear, is that the two functions to read/reset the flag are in the UART part of the documentation..

3
Discussion - Software / Re: FT260 and LibFT260, using Interrupts
« on: April 12, 2023, 10:29:05 AM »
hello,
it would be nice to also have replies on the forum here. it would allow to have a source of information for the missing points in the documentation...

I'm also looking for info about the interrupt possibility with the FT260 and the Windows DLL.
actually it's not clear what we can do with the interrupt and how to use it.
in AN395 there's two function in the "FT260 general functions": FT260_SetWakeupInterrupt & FT260_SetInterruptTriggerType.
but there's also two functions in the "UART functions": FT260_GetInterruptFlag & FT260_CleanInterruptFlag.
if I only activate the I2C interface but not the UART, can I still use the two functions get & clean interruptFlag, since those two don't have "UART" in their name unlike the other functions in the UART section ?
does the SetWakeupInterrupt & SetInterruptTriggerType functions are related to the functions GetInterruptFlag & CleanInterruptFlag ? is it the "same" interrupt ?
can I use those functions to receive interrupts from I2C ICs (like when an input change on a I/O expander) or are those functions dedicated to USB transactions ?

thanks..

4
Discussion - Software / Re: Receiving data from Ft260
« on: December 12, 2022, 07:07:16 AM »
hello,
why would you want to use the FT260 between two MCUs..? you could directly link two uarts.
if you want to connect the FT260 to your CH32V103C8T6, this one has to emulate an HID host connection. why would you want to add so much job to do for just a serial communication...?
I don't know the CH32V103C8T6, maybe you have some usb host software already done, but probably not to communicate with the specific hid dialog of the fT260. not the good way for me.

5
Discussion - Software / Re: FTProg & FT260 - not perfect ?
« on: June 21, 2022, 05:47:25 AM »
Ok, thanks very much for watching.
(Had to do a little pause in my development, but hope to get back to it very soon..)

7
Discussion - Software / Re: FTProg & FT260 - not perfect ?
« on: June 13, 2022, 05:51:53 PM »
hello,

yes of course I did unplug / replug it between the two results I post. even did it several times and also see that I can recover the original result after erasing the eeprom with FTPROG.
and I got the same thing on Windows 8.1 and Windows 10 (didn't have time to test on Windows 11 right now).

and what I posted in code sections is an extract from the USBview I take on FTDI website (I put the link at the bottom of my original post..).

 was thinking that my questions here (and even more the replies) could benefit to everyone. but I could also ask to the mail support next time if that's the better way for that.
(and there will be more questions coming, because I already found a few more errors and unclear points in the different pdf docs for the FT260; I just don't have enough time to verify everything before asking right now..)

thanks.
ffred

8
Discussion - Software / FTProg & FT260 - not perfect ?
« on: June 12, 2022, 02:22:18 PM »
Hi,
I want to be able to recognize which FT260 I have connected, so want to set a specific serial number to each FT260 I will use.
I use FTProg to set the EEPROM (actually I'm using UMFT260EV1A boards for my tests) and only want to change the serial number and keep the other parameters as default.

I used USDBview from Nirsoft and also Microsoft USBView I found on FTDI download page to compare how the FT260 enumerate on my computer. (links at the bottom).

here are the two screenshots (before & after FTPROG) from USBDView :



I just changed the serial number for "F0001A" on FTProg. it seems to work because with LibFT260 I can open the device with "FT260_OpenBySerialNumber", but why now the 3 lines for the FT260 doesn't still appear as FT260 in USBDView "device name" column ?

I also save the data from Microsoft USBView, before & after FTPROG. here are the files :
before:
Code: [Select]
Device Descriptor:
bcdUSB:             0x0200
bDeviceClass:         0x00
bDeviceSubClass:      0x00
bDeviceProtocol:      0x00
bMaxPacketSize0:      0x40 (64)
idVendor:           0x0403 (Future Technology Devices International Limited)
idProduct:          0x6030
bcdDevice:          0x2200
iManufacturer:        0x01
0x0409: "FTDI"
iProduct:             0x02
0x0409: "FT260"
iSerialNumber:        0x00
bNumConfigurations:   0x01

ConnectionStatus: DeviceConnected
Current Config Value: 0x01
Device Bus Speed:     Full
Device Address:       0x02
Open Pipes:              4

Endpoint Descriptor:
bEndpointAddress:     0x81  IN
Transfer Type:   Interrupt
wMaxPacketSize:     0x0040 (64)
bInterval:            0x01

Endpoint Descriptor:
bEndpointAddress:     0x02  OUT
Transfer Type:   Interrupt
wMaxPacketSize:     0x0040 (64)
bInterval:            0x01

Endpoint Descriptor:
bEndpointAddress:     0x83  IN
Transfer Type:   Interrupt
wMaxPacketSize:     0x0040 (64)
bInterval:            0x01

Endpoint Descriptor:
bEndpointAddress:     0x04  OUT
Transfer Type:   Interrupt
wMaxPacketSize:     0x0040 (64)
bInterval:            0x01

Configuration Descriptor:
wTotalLength:       0x0049
bNumInterfaces:       0x02
bConfigurationValue:  0x01
iConfiguration:       0x00
bmAttributes:         0xA0 (Bus Powered Remote Wakeup)
MaxPower:             0x32 (100 Ma)

Interface Descriptor:
bInterfaceNumber:     0x00
bAlternateSetting:    0x00
bNumEndpoints:        0x02
bInterfaceClass:      0x03 (HID)
bInterfaceSubClass:   0x00
bInterfaceProtocol:   0x00
iInterface:           0x00

HID Descriptor:
bcdHID:             0x0111
bCountryCode:         0x00
bNumDescriptors:      0x01
bDescriptorType:      0x22
wDescriptorLength:  0x0117

Endpoint Descriptor:
bEndpointAddress:     0x81  IN
Transfer Type:   Interrupt
wMaxPacketSize:     0x0040 (64)
bInterval:            0x01

Endpoint Descriptor:
bEndpointAddress:     0x02  OUT
Transfer Type:   Interrupt
wMaxPacketSize:     0x0040 (64)
bInterval:            0x01

Interface Descriptor:
bInterfaceNumber:     0x01
bAlternateSetting:    0x00
bNumEndpoints:        0x02
bInterfaceClass:      0x03 (HID)
bInterfaceSubClass:   0x00
bInterfaceProtocol:   0x00
iInterface:           0x00

HID Descriptor:
bcdHID:             0x0111
bCountryCode:         0x00
bNumDescriptors:      0x01
bDescriptorType:      0x22
wDescriptorLength:  0x0117

Endpoint Descriptor:
bEndpointAddress:     0x83  IN
Transfer Type:   Interrupt
wMaxPacketSize:     0x0040 (64)
bInterval:            0x01

Endpoint Descriptor:
bEndpointAddress:     0x04  OUT
Transfer Type:   Interrupt
wMaxPacketSize:     0x0040 (64)
bInterval:            0x01

after:
Code: [Select]
Device Descriptor:
bcdUSB:             0x0200
bDeviceClass:         0x00
bDeviceSubClass:      0x00
bDeviceProtocol:      0x00
bMaxPacketSize0:      0x40 (64)
idVendor:           0x0403 (Future Technology Devices International Limited)
idProduct:          0x6030
bcdDevice:          0x2200
iManufacturer:        0x01
iProduct:             0x02
iSerialNumber:        0x03
bNumConfigurations:   0x01

ConnectionStatus: DeviceConnected
Current Config Value: 0x01
Device Bus Speed:     Full
Device Address:       0x02
Open Pipes:              4

Endpoint Descriptor:
bEndpointAddress:     0x81  IN
Transfer Type:   Interrupt
wMaxPacketSize:     0x0040 (64)
bInterval:            0x01

Endpoint Descriptor:
bEndpointAddress:     0x02  OUT
Transfer Type:   Interrupt
wMaxPacketSize:     0x0040 (64)
bInterval:            0x01

Endpoint Descriptor:
bEndpointAddress:     0x83  IN
Transfer Type:   Interrupt
wMaxPacketSize:     0x0040 (64)
bInterval:            0x01

Endpoint Descriptor:
bEndpointAddress:     0x04  OUT
Transfer Type:   Interrupt
wMaxPacketSize:     0x0040 (64)
bInterval:            0x01

Configuration Descriptor:
wTotalLength:       0x0049
bNumInterfaces:       0x02
bConfigurationValue:  0x01
iConfiguration:       0x00
bmAttributes:         0xA0 (Bus Powered Remote Wakeup)
MaxPower:             0x32 (100 Ma)

Interface Descriptor:
bInterfaceNumber:     0x00
bAlternateSetting:    0x00
bNumEndpoints:        0x02
bInterfaceClass:      0x03 (HID)
bInterfaceSubClass:   0x00
bInterfaceProtocol:   0x00
iInterface:           0x00

HID Descriptor:
bcdHID:             0x0111
bCountryCode:         0x00
bNumDescriptors:      0x01
bDescriptorType:      0x22
wDescriptorLength:  0x0117

Endpoint Descriptor:
bEndpointAddress:     0x81  IN
Transfer Type:   Interrupt
wMaxPacketSize:     0x0040 (64)
bInterval:            0x01

Endpoint Descriptor:
bEndpointAddress:     0x02  OUT
Transfer Type:   Interrupt
wMaxPacketSize:     0x0040 (64)
bInterval:            0x01

Interface Descriptor:
bInterfaceNumber:     0x01
bAlternateSetting:    0x00
bNumEndpoints:        0x02
bInterfaceClass:      0x03 (HID)
bInterfaceSubClass:   0x00
bInterfaceProtocol:   0x00
iInterface:           0x00

HID Descriptor:
bcdHID:             0x0111
bCountryCode:         0x00
bNumDescriptors:      0x01
bDescriptorType:      0x22
wDescriptorLength:  0x0117

Endpoint Descriptor:
bEndpointAddress:     0x83  IN
Transfer Type:   Interrupt
wMaxPacketSize:     0x0040 (64)
bInterval:            0x01

Endpoint Descriptor:
bEndpointAddress:     0x04  OUT
Transfer Type:   Interrupt
wMaxPacketSize:     0x0040 (64)
bInterval:            0x01

the only differences seems to be in the first "device descriptor" block.
does this seems normal to you ? why the way it's showing in USBDView doesn't stay the same ?

thanks,
ffred
 

https://www.nirsoft.net/utils/usb_devices_view.html
https://ftdichip.com/utilities/

9
to everyone interested, I got a reply by mail :

I have got confirmation:
FT260_GetInterruptFlag reads but leaves the flags set and FT260_CleanInterruptFlag reads but also clears the flags.


10
I found something in "AN_394_User_Guide_for_FT260.pdf" (page 16, the description for bytes 1-4) which give some information :



I first thought while reading rapidly that it confirm what I was thinking, but it says 02 is the minor version and 00 the major version. so what, v0.2 ?
still not completely clear... (or maybe my english is too bad ??)

11
Hi,
the documentation is nearly the same for the two functions FT260_GetInterruptFlag & FT260_CleanInterruptFlag. they're defined the same way, with the same parameters.
the only difference is the "summary" : get interrupt flag for one and clean the interrupt flag for the other, but they both got the same pbFlag parameter.
could be nice to have more explanation about that.

it's clear that with FT260_GetInterruptFlag we can read the interrupt flag and probably it's not reset after that.
but can I imagine that FT260_CleanInterruptFlag also read the interrupt flag AND reset it..??
if not, what is the pbFlag for ?

you should add a few words to FT260_CleanInterruptFlag summary to make things clearer...

thanks.
ffred

12
Discussion - Software / LibFT260: missing doc for FT260_SetFeature ?
« on: June 05, 2022, 08:03:52 PM »
Hi,
there's a FT260_SetFeature function in LibFT260.h, but there's no documentation for it in "AN_395_User_Guide_for_LibFT260.pdf".
(and still not in the more recent doc you mailed me..).
what can we do with it ?

thanks.
ffred

13
Hi Rr42,

yes, FT260 is HID, and you got two HID devices on one FT260. so you will have to use the LibFT260 library (or another one for direct hid communication) and you won't be able to use it as a classic COM port..

the output you give don't seem to be the one from the "getting_started" example, but from the "open_device" example.

now there's something problematic with the output you show (and I got something similar here after running the same example), because the index 1, 2, 5, 6,... are reported to be opened ok, but I don't see any FT260 VID/PID in the device path associated.
in fact, you got one on index 16 !

the problem I think is that the example is not using the good method to select and open an FT260 device. of course the library shouldn't reply opened ok for an hid device that is not an FT260, but there's a way to work around that here : https://github.com/fs000x/ft260UI
if you look in "ft.py", it read the device_path for every index and try to open it only if this device_path contain the VID/PID corresponding to the FT260. will do it like that in my code too..

ffred


14
Hi,
in LibFT260 library documentation, the explanations are quite limited for FT260_GetChipVersion & FT260_GetLibVersion functions.
it only says : "Version 1.0.0.0 is shows as 16777216 in decimal" for FT260_GetChipVersion.

so 16777216 is 0x01000000 in hex > 01 00 00 00 for v1.0.0.0  ok, simple !
but in my soft I made a simple code for converting the value and got : v1.1.5.0 for lib version (ok) &  v2.60.2.0 (?) for the chip version.
your sample code "getting_started" was giving me 2.0.2.0 !

so I looked into your code and saw that there's a mask with 0x0F for each byte, which explain the result.  (but should be in the doc)

but is it really a 2.0.2.0 version or maybe a 2.0 version for an FT260, because it's a really strange coincidence to have 2.60.2.0 ..  :o

thanks
ffred

15
Discussion - Drivers / Re: missing DLL on Windows 11 for LibFT260 ?
« on: May 31, 2022, 07:49:23 PM »
it's ok now (didn't change my code).  :D
I also installed Microsoft Visual C++ 2010 x64 Redistributable.
thanks.
ffred

Pages: [1] 2