Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 8 of 8

Thread: Teensy to teensy USB

  1. #1
    Junior Member
    Join Date
    Feb 2019
    Posts
    4

    Teensy to teensy USB

    Is communication between two or more Teensy 3.6 controllers on either USB port possible? If so, has anyone made any libraries for this purpose?

    Thanks,
    Dae

  2. #2
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    19,508
    I believe you can plug any Teensy running Serial into the Teensy 3.6 host port.

    In Arduino, click File > Examples > USBHost_t36 > SerialTest for code to get started.

  3. #3
    Junior Member
    Join Date
    Feb 2019
    Posts
    4
    Thank you for your response. I will look into USBHost_t36 when I get a spare moment. Do you know if a single Teensy can communicate with several other Teensys in a hub/spoke pattern via a USB hub?

    I have a need to communicate between five teensys at the fastest data transfer rate possible, one master and four slave devices. I2C is too slow and the Teensy seems to have trouble using SPI as a slave (if this is not the case I am very much interested in SPI). Is USB a viable alternative in this configuration?

  4. #4
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    19,508
    Yes, USBHost_t36 supports hubs. You can put as many hub & serial instances in your program as needed.

  5. #5
    Junior Member
    Join Date
    Mar 2015
    Posts
    12
    does this mean I could connect a usb hub to a teensy 3.6 and connect as many other teensy boards, lets say LCs to the usb hub and have all communicate via their own serial object instance? Does the USBSerial object provide similar methods as the normal serial object? (I quickly scanned through the source, seems like this is the case, but I am not sure)

    Is there any documentation yet? Is the library '"stable"?

    If this is all true, this seems to be very very nice!
    What would be the speed one could expect?

  6. #6
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    19,508
    Yes, to all your questions, except "sort of" on the library status. The core EHCI & enumeration stuff is pretty solid, and the serial and hub drivers work very well. The library still does not support isochronous at all, and there's a long list of drivers to make, so large changes can be expected to the library for quite some time. There's also a good chance we'll eventually migrate to using EventResponder for some stuff, which could be considered quite a large change.

    Support for high-speed (480 Mbit) USB serial devices is still lacking. Not an issue with Teensy 3.x boards.

    Of course the available memory does limit the number of driver instances. Teensy 3.6 has quite a lot of memory and each instance doesn't use much memory, but eventually if you expand to hundreds of devices, you will hit memory limits.

  7. #7
    Junior Member
    Join Date
    Mar 2015
    Posts
    12
    wow! Thanks a lot!

    Now I have to get a teensy 3.6 :-)

    I guess the bigger problem is to find a good and cheap usb hub with many ports

  8. #8
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    19,508
    When you use "large" hub like 10 or 13 ports, keep in mind that nearly all of them are internally several 4 port hubs connected together. You'll need 1 hub instance in your code for each actual hub chip, even though the consumer-visible info looks like it's just 1 hub.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •