Questions about USB CDC and SPI

Status
Not open for further replies.
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.
 
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!
 
Status
Not open for further replies.
Back
Top