FlexCAN_Library icon indicating copy to clipboard operation
FlexCAN_Library copied to clipboard

Support for Teensy 3.5 and 3.6 (dual CAN) + alternative CAN pins

Open pawelsky opened this issue 8 years ago • 17 comments

pawelsky avatar Sep 09 '16 15:09 pawelsky

@pawelsky I think best if you have write permissions for this repo and can own these revisions, so to speak. I don't have the hardware. Would you be interested in that? I will have to learn how to set that up correctly if so, bet it is simple.

teachop avatar Sep 09 '16 16:09 teachop

I would prefer someone to have a critical look at the code before merge. BTW, I've seen you on Paul's list of K66 betatesters? Didn't you get a board? Maybe Paul still has some left?

pawelsky avatar Sep 09 '16 17:09 pawelsky

I didn't respond to the board offer. I will look about getting one...

teachop avatar Sep 09 '16 17:09 teachop

I'm not sure what to do about this pull request I have with teachop's Flexcan https://github.com/teachop/FlexCAN_Library/pull/14 It adds another common speed 3333bps and a single wire can part to the list. Is this going to be the new source for Flexcan? Should I redo the pull request here since it seems to be ignored at teachop?

Mike4U avatar Sep 10 '16 22:09 Mike4U

@Mike4U please forgive ignoring your request. I am looking about getting set up with hardware again.

teachop avatar Sep 10 '16 22:09 teachop

@teachop Sorry, I can't get my head around using this github. I meant to post the above comment on pawelsky's, but it would be even better to have you back and keep everything together.

Mike4U avatar Sep 10 '16 22:09 Mike4U

@pawelsky is there any chance you could add the support for the RTR bit in reading and writing of CAN messages? The changes are quite minimal to your already excellent work. Im just testing them right now on a 3.6. I have used the mods on a 3.1/3.2 with no issues at all. This looks like its going to become the official version so i want to make sure its in there as its very important for interfacing to real world applications.

H4nky84 avatar Oct 17 '16 19:10 H4nky84

The goal of my branch was to provide only the dual CAN support that can be easily merged to teachop's original code. It is up to him to decide on whether to merge your RTR pull request as well or not.

pawelsky avatar Oct 17 '16 20:10 pawelsky

@pawelsky wow, i am using the teachop library to play around and found now the teensy 3.6 with two can bus connections. did a search for an library to support both and found your library. i don't know how to find a way to get in contact to you so i try it here. I am using a teensy 3.2 and a MCP 2551 for now. Power supply is 5 Volt. You write that the teensy 3.6 will not work with 5 Volt (teensy supply 5 V and MCP2551 5 V), is that right? My hope was that the RX/TX of can bus does not use the 5 Volt of the supply.

Alex-2-5 avatar Oct 21 '16 11:10 Alex-2-5

@Alex-2-5 what I'm saying is that T3.6 will not tolerate 5V on the input pins. You would have to check MCP2551 datasheet to see what it its IO voltage.

pawelsky avatar Oct 21 '16 17:10 pawelsky

@Alex-2-5 the MCP2551 does indeed use 5v signalling on the Tx and Rx lines so is unsuitable for the Teensy 3.6. The best option is the MCP2562 part which has the option for a VIO connection. Tie this to 3.3v and the io lines will be signalled at 3.3v allowing the Teensy 3.6 to use it. I have tested the MCP2562 on both the Teensy 3.6 can ports and it works well. Just don't forget to pull the standby pin on the MCP2562 to ground or it won't work.

H4nky84 avatar Oct 21 '16 21:10 H4nky84

OK thank you very much, thats what i had to know :) So i can forget my PCBs made for the Teensy 3.2 with voltage regulator (to 5 Volt) and the MCP2551. I will give it a try with the MCP2562 as you recommended, thanks.

Alex-2-5 avatar Oct 22 '16 08:10 Alex-2-5

@Alex-2-5 Not necessarily. You have at least two options:

  • Find a source of 3.3V (e.g. from Teensy's insternal regulator) and connect to the VIO pin of the MCP2562 (the chip itself can still be powered with 5.0V)
  • Replace the regulator with a 3.3V one and use a pin compatible CAN transceiver that works on 3.3V

P.S. I think this discussion is getting a bit off topic here...

pawelsky avatar Oct 22 '16 08:10 pawelsky

Thank you. Solution 2) is no option becuase i have some other devices using 5 Volt. I will use the internal regulator of the teensy to supply the VIO pin. If i am right VDD can be 5 Volt but VIO needs to be 3.3 Volt and RX/TX will use the VIO voltage. Anyway i need to create a new PCB because everything is allready mounted on it. Yes it is off topic, but we can end this now i got it, thanks again.

Alex-2-5 avatar Oct 22 '16 08:10 Alex-2-5

Yes that is correct. The supply is still 5v it is just the ViO that needs to be at 3.3v to bring the rx and Tx lines down to 3.3v operation for compatibility with the teensy 3.6.

H4nky84 avatar Oct 22 '16 09:10 H4nky84

Or use an sn65hvd234 which is natively 3.3v and works great.

On Oct 21, 2016 5:07 PM, "H4nky84" [email protected] wrote:

@Alex-2-5 https://github.com/Alex-2-5 the MCP2551 does indeed use 5v signalling on the Tx and Rx lines so is unsuitable for the Teensy 3.6. The best option is the MCP2562 part which has the option for a VIO connection. Tie this to 3.3v and the io lines will be signalled at 3.3v allowing the Teensy 3.6 to use it. I have tested the MCP2562 on both the Teensy 3.6 can ports and it works well. Just don't forget to pull the standby pin on the MCP2562 to ground or it won't work.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/teachop/FlexCAN_Library/pull/19#issuecomment-255465382, or mute the thread https://github.com/notifications/unsubscribe-auth/ACC7Zba-UmCMgAHPZo2L8U4tpCkzbu5hks5q2Sl8gaJpZM4J5L5g .

collin80 avatar Oct 25 '16 18:10 collin80

Why are of these pull requests just sitting here for so long? This change was immensely helpful in getting my teensy 3.6 on a CAN network. Thanks for your work @pawelsky

irbigturtle avatar Mar 28 '17 09:03 irbigturtle