Hi everyone, I have a Teensy 4.0 board and what I technically want to do is to connect it to a car ECU and read the ECU can messages with it.
However, to first test (and learn) the proper use of the CAN bus on Teensy I wanted to use the two CAN buses (CAN1 and CAN2), one of the to send messages and receive them with the second CAN. I have worked with CAN before (not on teensy), but I'm having issues this time.
I am using this transceiver: https://www.amazon.es/ICQUANZX-SN65HVD230-comunicaci%C3%B3n-transceiver-Arduino/dp/B07VG3Z9GT/ref=sr_1_2?__mk_es_ES=%C3%85M%C3%85%C5%BD%C3%95%C3%91&crid=QN7QPFGWK0MF&keywords=can+transceiver&qid=1645697676&sprefix=can+transceive%2Caps%2C109&sr=8-2
My connections are simple: pins 22 and 23 (CAN1) to the first transceivers TX and RX. Pins 0 and 1 to the second transceivers RX and TX. Both transceivers are connected to 3.3V and GND. Last, CAN_HIGH of both trasnceivers are conected, and CAN_LOW are also connected.
I tried this with the sample code of the FlexCAN library but I got no good results. Does anyone have a code I can try with this configuration?
Thanks a lot in advance.
However, to first test (and learn) the proper use of the CAN bus on Teensy I wanted to use the two CAN buses (CAN1 and CAN2), one of the to send messages and receive them with the second CAN. I have worked with CAN before (not on teensy), but I'm having issues this time.
I am using this transceiver: https://www.amazon.es/ICQUANZX-SN65HVD230-comunicaci%C3%B3n-transceiver-Arduino/dp/B07VG3Z9GT/ref=sr_1_2?__mk_es_ES=%C3%85M%C3%85%C5%BD%C3%95%C3%91&crid=QN7QPFGWK0MF&keywords=can+transceiver&qid=1645697676&sprefix=can+transceive%2Caps%2C109&sr=8-2
My connections are simple: pins 22 and 23 (CAN1) to the first transceivers TX and RX. Pins 0 and 1 to the second transceivers RX and TX. Both transceivers are connected to 3.3V and GND. Last, CAN_HIGH of both trasnceivers are conected, and CAN_LOW are also connected.
I tried this with the sample code of the FlexCAN library but I got no good results. Does anyone have a code I can try with this configuration?
Thanks a lot in advance.