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

Thread: Questions about USB CDC and SPI

  1. #1
    Junior Member
    Join Date
    Nov 2012
    Location
    Utah
    Posts
    10

    Questions about USB CDC and SPI

    So I'm fairly new to Arduino and the Teensy. I have three Teensy 3.0 that I've written some simple/fun projects.

    Here is the what I'm after: I have an app that I wrote for and MSP-430 (TI processor) and I'm wondering how hard it would be to port it to the Teensy 3.0.

    The MSP430 talks to the PC via USB CDC. From the PC side it looks like a serial port. I don't use the port settings. There is no real serial port. I just use it to haul data back and fourth at fast speeds.

    The MSP then does some magic and generates a stream of SPI traffic.

    So I have three questions:

    1) Is there some "USB CDC" stuff in all this code?

    2) Is there some awesome fast SPI code here too?

    3) Finally, is the Arduino environment up to the task of pulling all this together?

    Thanks for the help.

  2. #2
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    20,313
    Quote Originally Posted by DeweyOxberger View Post
    1) Is there some "USB CDC" stuff in all this code?
    Yes. Use Serial.print() or Serial.write() to send.

    The Tools > USB Type menu determines which type of USB device Teensy will implement when your program runs. Set it to "Serial" (the default) for a USB CDC serial device.

    2) Is there some awesome fast SPI code here too?
    Well, the Arduino SPI library is probably the easiest way.

    If you want really fast speed, above 8 Mbit/sec, you'll need to use native code. The latest versions of Bill's SdFat have native SPI code capable of 24 Mbit/sec speeds.

    3) Finally, is the Arduino environment up to the task of pulling all this together?
    Yes, most definitely!

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
  •