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

Thread: Teensy 2.0++, using UART and USB simultaneously

  1. #1
    Junior Member
    Join Date
    May 2013
    Posts
    2

    Teensy 2.0++, using UART and USB simultaneously

    I'm at the very early stages of a project and I want to make sure the Teensy 2.0++ fits the application.

    I have a serial motor controller, specifically the Pololu Qik 2s9v1 (http://www.pololu.com/catalog/product/1110) that I need to be able to control from the Teensy. Additionally I need to send commands from a PC to the Teensy, I assume via USB.

    Is there any reason this wouldn't work? And if not are there any code samples / projects out there I could look at for reference?

    Thanks!

  2. #2
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    20,322
    It should work fine. USB serial and hardware serial can work simultaneously.

    If you have control over the PC-side software, it's best to write your entire outgoing message as a single block. The PC will send it more efficiently. If you're sending a tremendous amount of data, efficient transfer on the USB can really help. If it's a short message, like a dozen bytes, sent at a slow rate like 1 to 50 times per second, then efficiency probably doesn't matter at all.

  3. #3
    Junior Member
    Join Date
    May 2013
    Posts
    2
    Quote Originally Posted by PaulStoffregen View Post
    It should work fine. USB serial and hardware serial can work simultaneously.

    If you have control over the PC-side software, it's best to write your entire outgoing message as a single block. The PC will send it more efficiently. If you're sending a tremendous amount of data, efficient transfer on the USB can really help. If it's a short message, like a dozen bytes, sent at a slow rate like 1 to 50 times per second, then efficiency probably doesn't matter at all.
    Thanks! I'll only be sending 4 or 5 bytes at once, but good to know about the efficiency if I need longer messages. Mainly I just wanted to make sure I could do both USB and hardware serial at once.

Tags for this Thread

Posting Permissions

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