teachop / FlexCAN_Library

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

Enable pins of CAN bus is reversed #32

Open wt70707 opened 5 years ago

wt70707 commented 5 years ago

I am working with Teensy 3.6 with the "Dual CAN-Bus adapter for Teensy 3.5, 3.6". Though in all examples, the pins are set to "HIGH", but I must set them to "LOW" to get it work with the example CANTest.

//if using enable pins on a transceiver they need to be set on pinMode(2, OUTPUT); pinMode(35, OUTPUT);

//digitalWrite(2, HIGH); // digitalWrite(35, HIGH); digitalWrite(2, HIGH); digitalWrite(35, HIGH);

pawelsky commented 5 years ago

Cool, but you are reporting the issue to the wrong repository as this library does not deal with enable pins.

You probably meant this one https://github.com/collin80/FlexCAN_Library

wt70707 commented 5 years ago

Thanks Pawelsky, there is no place to report issues at collin80. And all the examples here also have the above code to do the activation.

pawelsky commented 5 years ago

First of all the fact thet there is no place to report issues in Collin's repository does not mean you should report in to other random repository.

Secondly, no, there are no examples here that have the mentioned code.

Finally, even if there were this is not even a bug in the library, as the transcievers that you use do not have the ENABLE pins. They have Rs pins which for this particular chip (SN65HVD230D) enables the High-speed mode when pulled low, low-power mode when pulled high, and manages slope control when pulled down with a 10kohm-100kohm resistor.

If you really want to argue more contact colin80 directly (e.g. via the pjrc forum: https://forum.pjrc.com/threads/39867-Another-fork-of-FlexCAN) or create a pull request in HIS repo.

collin80 commented 5 years ago

Sorry for the mix up involving my repo. I have fixed the problem and if you have trouble you can now directly create an issue and yell at me for it.

wt70707 commented 5 years ago

Sorry Pawelsky. I am asking question not reporting a bug of the library. Your explanation make many sense. I will check the spec of SN65HVD230D. As you clearly mentioned about the pull down to control the slope, do you think I should put one, as I got very unstable CAN bus reading. I will put my question on Collin80.