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

Thread: Teensy canbus master slave

  1. #1

    Teensy canbus master slave

    Goodmorning everyone,
    I have to do a project that has 25 digital inputs and outputs these 25 outputs. The problem lies in the fact that I have to use two teensy with canbus master and slave communication.
    The two modules are placed 5 meters from each other.
    Can anyone help me?

  2. #2
    Senior Member
    Join Date
    Dec 2016
    Location
    Montreal, Canada
    Posts
    3,077
    you can do this easily with a single canbus packet containing all your 25 gpio states

  3. #3
    Which library should I use?

  4. #4
    Senior Member
    Join Date
    Dec 2016
    Location
    Montreal, Canada
    Posts
    3,077
    theres 3 libraries you can try:

    1) CollinK’s FlexCAN Library with mailbox only support

    2) Pawelsky’s FlexCAN Library fork with FIFO only support

    3) IFCT, which is new, supports both, and has alot of advanced capabilities that are easy to use

    in any case, all 3 libraries are capable for your use case. Just make sure you have a transceiver on each teensy, and make sure the transceiver has proper 120ohm terminations, and also that the transceiver is asserted in hardware or software otherwise you wont be able to transmit/receive frames

    Tony

Posting Permissions

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