teachop / FlexCAN_Library

Arduino library for CAN on Teensy 3.1
The Unlicense
154 stars 122 forks source link

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

Open pawelsky opened 7 years ago

teachop commented 7 years ago

@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.

pawelsky commented 7 years ago

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?

teachop commented 7 years ago

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

Mike4U commented 7 years ago

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?

teachop commented 7 years ago

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

Mike4U commented 7 years ago

@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.

H4nky84 commented 7 years ago

@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.

pawelsky commented 7 years ago

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.

Alex-2-5 commented 7 years ago

@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.

pawelsky commented 7 years ago

@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.

H4nky84 commented 7 years ago

@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.

Alex-2-5 commented 7 years ago

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.

pawelsky commented 7 years ago

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

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

Alex-2-5 commented 7 years ago

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.

H4nky84 commented 7 years ago

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.

collin80 commented 7 years ago

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

On Oct 21, 2016 5:07 PM, "H4nky84" notifications@github.com 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 .

irbigturtle commented 7 years ago

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