PDA

View Full Version : CAB bus applications



Alexey
- 15th February 2020, 05:49
Hello People!

Looking for any information on how to implement CAN communication using PBP3 but could find only a few threads, all about 10 years old or more and no success stories... Is PBP3 not good for CAN communication? Maybe someone could advise sample code for a micro with built-in CAN interface?

Thank you guys!
Alex

mpgmike
- 16th February 2020, 15:03
First, you can use external CAN modules that speak SPI/UART/I2C, making it easier for you.

Second, you will still need an additional CAN driver to work with the voltages required.

Check out Microchip's offerings for 1 & 2 at https://www.microchip.com/design-centers/can
At the bottom of the page is a Documentation tab with Application Notes available.

Third, depending on the application you are wanting to apply CAN to, you may have to learn the protocol. Automotive CAN protocol is spelled out quite explicitly in SAE J1939, J1979, J2178-1_2, and the all encompassing J1699 (just mentioning the few I have). Other industries operate under various other protocols. If you want to communicate with a CAN product that is not governed by any protocol standards, GOOD LUCK!!

CAN is not an quick learn like UART or SPI. You must REALLY need to use it or you'll give up before you conquer it.

Alexey
- 17th February 2020, 04:53
Thank you for the bookmarks. Yes, I agree, this is not very simple topic, so to start I did learn the protocol and some related standards and tried to communicate with the network devices using low level USB to CAN adapters from Windows and Linux computers (can-utils, Kangaroo, etc). Now my task is making a device which would read a few sensors and transmit data into existing CAN. Luckily my application needs to talk to other devices using the base ISO 11898-2 at 500000 bps rate, no J1939, etc.

Initially I was thinking about use of a cheap 8 bit micro with built-in CAN interface (yes, external driver is still needed) but I am now not sure if this is the best solution, possible a low level PIC12 or PIC 16 micro and CAN module is a better way to go? Do you suggest to look into transceivers with partial networking?

Again, thank you for the links for Microchip documents. Do you by chance have bookmarks for PBP3 code samples or something you could share? I saw some for Mikro C compiler but in the past I was very happy with PBP3 and my first choice would be staying with it. Second option could be Mikroelektronika or Microchip compilers

mpgmike
- 17th February 2020, 16:00
Post your question on ME Labs' forum:

http://support.melabs.com

Charles Leo has been working extensively with CAN lately and surely can help you out. He is the tech guy for ME Labs and the above link is to the official ME Labs Forum.