FT260 as a joystick

Hi, I have some FT260's and ATmega328p's at home and would like to do a game controller project. I would use the UART-USB interface from the atmega to the 260 to the pc, but I don't know where to start.

I have read the FT260 datasheet but I am still unsure. I have a few questions to help me understand better:

  1. Can I solder a USB cable to the FT260 chip and plug it in the PC with no extra circuitry and the pc will detect it successfully? FTDI mentions the drivers are supported by default for the chip.
  2. If it is detected, will it be detected as a generic HID device? I dont understand how you can specify you want it to be a mouse, a keyboard or a game controller? Would I specify this from the PC or I need to do something on the firmware side to tell the 260 it should be seen as a joystick?
  3. If I use the UART-USB interface, will I need to use putty? Or since its a HID, the PC knows what to do with it
  4. Do I need a 3rd party app on my PC to manage the inputs from the 260 or it will work out of the box?
  5. Can I just use Serial.print() to send characters via UART and if I plug in the 260 with just that, would the PC see the 260 as a keyboard being pressed with the Serial.print() messages?

Thanks a lot for your insight!

No, it will be detected as a serial port. It is a USB to UART bridge.

Ok, thanks.

Then what do they mean by

FT260 is a HID-class USB to I2C/UART interface Device Controller

And how do I make the device act as a HID device?

Without knowing your skill set and resources it is very hard to answer your questions. At this point is appears you have parts looking for a problem to solve, What is your application.

  1. Depends on your soldering skill and how the chip is mounded. Extra circuitry will be needed such as power and ground.
  2. I think that is in the driver but I am only guessing.
    3.I use putty on and in windows, it works great for holding glass and communication in windows.
  3. The inputs will be there but software is needed to interpret the data and to do something with it.
  4. It depends on the hardware and software.

Thank you for this great reply!

for more context, I am a firmware engineer but I am relatively junior. But I do have access to a lot of stuff at home and at work. I just have zero experience with consumer USB devices. I only work with dev boards and stuff that you can interface with putty pyserial or wtv).

The project is for fun, but also to help me grasp these concepts. I want to make a HID game controller (It could also be set as a HID keyboard and buttons presses would be seen as keys, but its not ideal for some games). I want to add an accelerometer and vibration DC motors but that is secondary, my main concern is designing the USB comm.

  1. I have the FT260S-U which is TSSOP, and ok skills. When you say extra circuitry, you mean power and ground other than the ones provided by the USB cable? I would of course add bypass caps
  2. This is something I do not understand clearly. Say it was in the drivers, that means it would automatically show as a HID device when you plug it in. But then, you can use different HID clients depending on the type of device you are using (mouse, keyboard, joystick, ...). So then, how do I tell the FT260 (and/or the host PC) which HID client it is supposed to use (i.e. a game controller in my case)?
  3. Do you have an example of software? For example, one of my goals is to use the Nintendo 64 emulator project64, which lets you play games using your keyboard or game controller plugged in via USB. You just need to map the keys of your device to what buttons you want to match from the original Nintendo64. Does that count as software that does something with the data, or you need something that acts like a bridge between drivers and you end goal application?
  4. Same question as 3, will help me a lot..

Thanks a lot for all this!

1 Like

I have zero experience with the FT260, but some experience with USB and HID-devices.

  1. Any modern mainstream OS will automatically recognize basic HID-devices like mouse, keyboard, or joystick. More exotic devices like 'magic carpet simulation device' probably won't be.

  2. When a HID-device is connected it will send a HID-report-descriptor describing what type of a device it is (mouse, keyboard, etc.) and the type of data it will send. On Arduino-boards you define the HID-report in the firmware. Not sure how to do it with the FT260. The datasheet talks about programming the device using the onboard eFUSE, but that does not seem to give much options.

For more info on HID-reports: Tutorial about USB HID Report Descriptors | Eleccelerator
For too much information on HID: Device Class Definition for HID 1.11 | USB-IF

  1. If the operating system has drivers for the HID-class of the device, then it will be automatically recognized. The USB standard defines massive amount of different types of HID-devices, most of which do not have standard drivers, but the most used ones do have and they work out of the box.

  2. Same as 3.

  3. I guess you need something in the FT260 to interpret the UART-input and send a HID-report describing a keyboard-press?

Maybe just wire the chip up, connect to the PC, and take a look what it is recognized as and what it outputs? If you happen to use linux-based system, 'dmesg', 'lsusb', and '/sys/kernel/debug/hid/' are great for debugging.

Brilliant, this is the info I was looking for to get started. Thanks a lot! I will start fiddling with the chip later this week and post my findings here!

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.