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

Thread: Teensy 3.0 SPI 1MHz

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

    Question Teensy 3.0 SPI 1MHz

    Hi there,

    I have a device running at 1MHz SPI slave, I want to use my Teensy 3.0 board to connect to it, is there any way to set the SPI speed to 1MHz?

    Thanks.

  2. #2
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    26,205
    Use SPI.setClockDivider(SPI_CLOCK_DIV16);

    Even though Teensy 3.0 runs much faster, the SPI Arduino library "SPI_CLOCK_DIVxx" settings are designed to give the same speed output as an AVR-based board running at 16 MHz, for compatibility with Arduino code.

  3. #3
    Junior Member
    Join Date
    May 2013
    Posts
    3
    Hi,

    Thanks, it works as you said.

    Cheers!

Posting Permissions

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