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

Thread: link a teensy 4.1 to an arduino mega 2560 R3

  1. #1

    link a teensy 4.1 to an arduino mega 2560 R3

    I want to link a teensy 4.1 to an arduino mega 2560 R3.

    What is the best way to hook these two together to exchange data? Serial? a parallel bus? SPI etc? Are there any libraries available to handle this?

    What to do about the 3.3v to 5v and visa versa?

  2. #2
    Senior Member
    Join Date
    Jul 2020
    Posts
    1,354
    You can use serial, the Arduino Mega has 4 serial interfaces. You'll need a level converter for each direction, but at a
    pinch you can use a resistive divider 1k:2k2 for 5v->3.3V and just directly connect for 3.3V->5V, since the Arduino will
    recognize 3.3V as HIGH.

    However a level converter is a safer option.

  3. #3
    Senior Member
    Join Date
    Dec 2016
    Location
    Montreal, Canada
    Posts
    3,903
    safer to protect the teensy tx pin should you misprogram the mega and shoot 5v down the line. You could always go with a Teensy 3.5 as it is 5v tolerant and will talk fine to mega directly wired with the uarts

  4. #4
    I keep running into dead ends on this. Im thiking I will be moving midi over the serial lines from the t4.1 to the mega and back. Now I wonder if I go with opto isolators as you would with a midi input. Or is there a good IC anyone can reccommend to handle this?

  5. #5
    Senior Member BriComp's Avatar
    Join Date
    Apr 2014
    Location
    Cheltenham, UK
    Posts
    455
    What you want for a level shifter is an ADUM1201. They can be obtained ready mounted on breakout board like this.

Posting Permissions

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