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

Thread: Canbus with Teensy 3.2/4.0

  1. #1

    Canbus with Teensy 3.2/4.0

    Hello!

    I am new to using teensy and need to communicate over canbus between several teensys for a project. For the sake of simplicity I am starting by just trying to send a short message from one teensy to another. I am currently using the following CAN bus chips: https://copperhilltech.com/can-bus-mini-breakout-board/. I have found good resources for wiring, but am struggling to work through the code. I am trying to use the flexcan library and have found example code to receive a message but am struggling as to how to send a message. Does anyone have any good resources/tutorials I should look into?

    Additionally, I have access to either Teensy 3.2 or 4.0s. Someone told me that a new feature of the Teensy 4.0 was that you did not need an additional can bus break out board to send/receive messages. Is that accurate? I could not find documentation to support that claim.

    Any help is much appreciated :-)

  2. #2
    Senior Member+ mjs513's Avatar
    Join Date
    Jul 2014
    Location
    New York
    Posts
    4,196
    @RoboticsDolphin

    Well first you haven't told us what Flexcan library you are using and showed us the examples you are using. Usually the FlexCan libs have examples for reading and writing.

    As for the T4 not needing a transceiver that is not correct. You will need one of those transceivers for the T4 as well to use CAN2.0 on the T4. I picked mine up from Amazon: https://www.amazon.com/SN65HVD230-CA...D7BV6253A1JERZ

  3. #3
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    9,921
    Also - give a look on the forum for Teensy specific tested/developed CAN libraries.

    This one is now well evolved :: FlexCAN_T4-FlexCAN-for-Teensy-4

    Reading/following that thread and working with it should lead to a useful solution or enough information to get a good answer and perhaps offer testing help to get it working.

  4. #4
    Senior Member+ mjs513's Avatar
    Join Date
    Jul 2014
    Location
    New York
    Posts
    4,196
    @tonton81 also just posted that he updated the FlexCAN_t4 library to work on the T3.x's. So would suggest you start with that library.

Posting Permissions

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