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

Thread: Teensy 4.1 - Using CTX1 and MOSI

  1. #1
    Senior Member
    Join Date
    Jun 2017
    Posts
    127

    Teensy 4.1 - Using CTX1 and MOSI

    Hello:

    I have a Teensy 4.1 which is interfaced to a CAN controller via CRX1 and CTX1 (pins 23, 22).

    I need to use the Teensy41 with this SPI LCD (http://simple-circuit.com/arduino-st...splay-example/).

    I just noticed that pin 11(MOSI) is also CTX1. I cannot use CRX2, CTX2 because I am using it as a serial port.

    Will this cause problems and is there a way around this?

    Thanks in advance for the community's help.

  2. #2
    Senior Member
    Join Date
    Dec 2016
    Location
    Montreal, Canada
    Posts
    3,797
    you can continue using pins 23,22 for CAN. By default the state of pin 11 is INPUT_DISABLE (high impedance state). The moment you use SPI.begin() it is assigned as MOSI, and NOT CAN. The pins have many functions, but programatically, they can only be one or the other.

  3. #3
    Senior Member
    Join Date
    Jun 2017
    Posts
    127
    Thank you @tonton81.

    If I understand you, this means that once the LCD which uses SPI starts, CAN1 stops working?

  4. #4
    Senior Member
    Join Date
    Dec 2016
    Location
    Montreal, Canada
    Posts
    3,797
    no CAN continues working on pins 23,22
    pin11 is just an alternate pin for CAN, it is not configured to be CAN only SPI
    Last edited by tonton81; 06-02-2021 at 06:04 PM.

  5. #5
    Senior Member
    Join Date
    Jun 2017
    Posts
    127
    Thank you @tonton81. This is great news.

Posting Permissions

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