This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

LAUNCHXL-F28379D: Connecting two Launchpads using CAN

Part Number: LAUNCHXL-F28379D
Other Parts Discussed in Thread: SN65HVD234, LAUNCHXL-F280049C

All:

The LAUNCHXL-F28379D has a CAN transceiver (SN65HVD234) that goes to a 2-pin header + ground. 

If I wanted to experiment with CAN, could I connect two Launchpads by connecting CANH to CANH, CANL to CANL, and ground to ground?

Each Launchpad would have transceivers and it looks like it would also have the required 120 Ohm termination.

I tried searching and I could not see a post with this - any problems, if I keep the distance between Launchpads close, and use 3 jumpers?

  • Hi Todd,

    Yes, that should be the proper way to connect the CAN. In fact, CANH, CANL and GND are the connections needed to hook up to the CAN bus through a DB9 connector. In your case for the Launchpad, you can use three wires. CAN bus can be up to 40m length. But you would need to adjust bit timings to ensure proper communications to compensate for line delays for longer bus lengths. If you are just connecting two launchpads together which are in close proximity, you do not need to modify the bit timings in the CAN example codes.

    Best regards,
    Joseph
  • I tried modifying the can_ex3_external_transmit code, but I have not been successful in setting up communications. Has anyone been able to create some code that would allow two Launchpads to communicate with each other via CAN?
  • Hi Todd,

    In Launchpad, GPIO12 and GPIO17 have direct connections to the CAN transceiver. This means that the CANB should be used in the can_ex3_external_transmit_code. Value for DEVICE_GPIO_CFG_CANRXB should be changed to GPIO_17_CANRXB and DEVICE_GPIO_CFG_CANTXB to GPIO_12_CANTXB. On the first Launchpad you need to modify the example code so that CANB will be transmitting and you can remove the ISR for the receive routines (essentially remove references and functions pertaining to CANB and replace references and functions on CANA to CANB on the ex3 sample code). On the second Launchpad, you just need to delete references and functions on CANA. The ex3 sample code is already has an ISR set for CANB to receive data from the CAN bus.

    Hope this helps.

    Best regards,
    Joseph
  • I am trying to go from CANA on one Launchpad (thru the CAN transceiver) to CANA on a second Launchpad (again thru the CAN transceiver). These transceivers ONLY exist for CANA on these Launchpads. As far as I know, LAUNCHXL-F28379D, LAUNCHXL-F28377S, and LAUNCHXL-F280049C are the only C2000 Launchpads with built-in CAN transceivers...actually, I am trying to go from LAUNCHXL-F28377S to LAUNCHXL-F280049C.
  • If you are using LAUNCHXL-F28377S, then yes the CANRX and TX resources connected to CAN transceiver is CANA (GPIO70 and 71 so CANRX and TX assignments have to be changed accordingly). In LAUNCHXL-F280049C, CANRX and TX connected to the transceiver is also on CANA (GPIO32 and 33). For the code running in LAUNCHXL-F28377S, remove all references to CANB in the ex3 sample code (this will be the transmitting node) and for LAUNCHXL-F280049C, remove all references to CANA and rename CANB to CANA using the ex3 sample code.

    Regards,
    Joseph
  • I ran into problems with the two Launchpads - not sure if it was a oscillator issue, or what...

    Fortunately, we had 2 experimenter boards that were equipped with CAN transceivers and I was able to get those to communicate. I do not know if I will get back to the two Launchpads - might be a good demo for TI if you can create the code to communicate. I know there were several changes to get the Launchpads to build properly with the ex3 sample code.