SPI on an LC questions

colorado_hick

Well-known member
I am trying to do this tutorial but on an LC instead of a Uno:
https://create.arduino.cc/projecthu...3-dds-signal-generator-and-arduino-uno-9286e3
The tutorial defines the interface pins as the SPI clock, SPI data, and the SPI Load.

On the LC there seems to be two separate serial interfaces. Do I have to do anything to specify which one I am using? It looks like SCK0 (I assume the first SPI clock) maps to pin #13. Pin #13 is lit up when I run the code. How do I know #13 is the serial clock instead of the internal LED?

The teensy pins and tutorials reference the MOSI and MISO pins. Which of these are equivalent to the "SPI Data pin" referenced in the tutorial?

The example does not explicitly include SPI.h. Is this something I need to do?

Also what is the 'SPI Load pin'? Can this be any digital pin or does it have to be one of the pins that is predefined for SPI connections?


Thanks!!
 
SPI pins on a Teensy LC:
Code:
LC pin 11 (MOSI0): DAT -> Arduino Pin 11 // SPI Data pin 

LC Pin 13 (SCK0):  CLK -> Arduino Pin 13 // SPI Clock pin
 - yes, this is also the LED pin.

LC pin 10 (CS0):   FSY -> Arduino Pin 10 // SPI Load pin (FSYNC in AD9833 terminology)
 - usually referred to as Chip Select
It won't use pin 12 (MISO0) because the slave doesn't send any data.

Pete
 
Back
Top