I am trying to build a CAN - USB converter using the MCP 25625 chip to convert CAN to SPI first and then receive/send the SPI data on an MCP 2210 chip of SPI interface and consequently convert to USB.

So far I have been successful in interfacing the two chips and getting data across on each of them.

I set my BR of my CAN controller(i.e. MCP 25625 to 1 Mbps) which is coherent with the target device that is spewing data on to this controller.

The issue that I am facing is with the data that my target device sends, I know it has a payload has some ASCII but the data that I receive on the CAN controller read through the SPI -> USB MCP 2210 chip, shows up in complete binary and also the number of bytes to be received lesser in number.

There is a CAN packet header that is also being sent prior to the payload but the spew of data that I receive has no ASCII whatsoever whereas my target device does send ASCII and I confirmed this using the commerical PCAN/USB adapter.

I set the SPI baud rate to 1 Mbps as well.

I am running into a block on where I should start debugging this. Any help would be appreciated.

  • 1
    \$\begingroup\$ Ascii is a different representation of binary. What isn't working? \$\endgroup\$ – Jeroen3 Jun 20 '17 at 6:09
  • \$\begingroup\$ How do you even configure the CAN controller if there is no MCU? \$\endgroup\$ – Lundin Jun 20 '17 at 6:40
  • \$\begingroup\$ @Lundin Like I said the MCP 2210 chip behaves like the MCU i.e. programmer, which is configured using the USB interface which in turn sends commands to the CAN controller to configure that end of things. \$\endgroup\$ – Siddhant Jun 20 '17 at 22:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.