Author Topic: where do i start with learning about CAN implementation  (Read 5233 times)

0 Members and 1 Guest are viewing this topic.

Offline SimonTopic starter

  • Global Moderator
  • *****
  • Posts: 18613
  • Country: gb
  • Did that just blow up? No? might work after all !!
    • Simon's Electronics
where do i start with learning about CAN implementation
« on: July 16, 2015, 09:59:14 am »
If I just google about CAN I get lots of generic explanations, or details on specific chips. What is the best way to learn generically about implementing and setting up for CAN. is it to read one controllers datasheet knowing that the concepts are the same for any IC ?
 

Offline filssavi

  • Frequent Contributor
  • **
  • Posts: 433
Re: where do i start with learning about CAN implementation
« Reply #1 on: July 16, 2015, 10:45:37 am »
Unfortunately there is no unique implementaion of CAN, the first thing you want to know is how the protocol works (especially the adressing and received message filtering stuff)

From here is pretty much all specific to the microcontroller you are using, for example I worked on atmel sam3 (arduino due's MCU) and the register interface and controller inner working is totally different from the TI part i'm using now
 

Offline Wilksey

  • Super Contributor
  • ***
  • Posts: 1329
Re: where do i start with learning about CAN implementation
« Reply #2 on: July 16, 2015, 10:48:50 am »
Are you talking about CAN in general or CAN for automotive diagnostics?
 

Offline SimonTopic starter

  • Global Moderator
  • *****
  • Posts: 18613
  • Country: gb
  • Did that just blow up? No? might work after all !!
    • Simon's Electronics
Re: where do i start with learning about CAN implementation
« Reply #3 on: July 16, 2015, 11:05:39 am »
I'm talking CAN in general at a hardware level, I'd be inclined to use a separate can chip as that way I have my choice of uC and i don't need to keep learning a new chip.
 

Offline McBryce

  • Super Contributor
  • ***
  • Posts: 2760
  • Country: de
Re: where do i start with learning about CAN implementation
« Reply #4 on: July 16, 2015, 11:29:59 am »
There's a couple of good books about it that I recommend to my Engineers, unfortunately they are only in German, but there are probably English equivalents. A quick Amazon search should turn up a few options.

McBryce.
30 Years making cars more difficult to repair.
 

Offline AndyC_772

  • Super Contributor
  • ***
  • Posts: 4429
  • Country: gb
  • Professional design engineer
    • Cawte Engineering | Reliable Electronics
Re: where do i start with learning about CAN implementation
« Reply #5 on: July 16, 2015, 11:40:47 am »
I'm talking CAN in general at a hardware level, I'd be inclined to use a separate can chip as that way I have my choice of uC and i don't need to keep learning a new chip.

You'll need an external physical transceiver with almost any microcontroller, but they're 'dumb', there's nothing to program.

IMHO you're much better off learning how to use the CAN peripheral in your chosen micro, rather than trying to come up with a good way to make a micro use an external CAN device.

Start with a scope and a PCAN, and go from there. I found getting up and running on an STM32 surprisingly painless.

Offline SimonTopic starter

  • Global Moderator
  • *****
  • Posts: 18613
  • Country: gb
  • Did that just blow up? No? might work after all !!
    • Simon's Electronics
Re: where do i start with learning about CAN implementation
« Reply #6 on: July 16, 2015, 11:44:37 am »
last can controller I looked at probably had it's own micro in it to manage the thing. I gather you get controllers that talk with SPI to your system uC and probably have to be setup by the main program in the main uC at each power up.
 

Offline leblanc

  • Regular Contributor
  • *
  • Posts: 51
  • Country: ca
Re: where do i start with learning about CAN implementation
« Reply #7 on: July 20, 2015, 11:49:23 pm »
Most of the time you won't need to know the details of CAN. It's almost all done for you in the transceiver.

The uC will have a tx and rx going to the transceiver, which provides a CAN H and CAN L to the outside world.

The number one mistake is forgetting to load the bus. Typically, 60 ohms between the high and low lines (i.e. 120 at each end).

If you just want a want to have a communication method and don't have a specific reason to learn CAN,  I'd chose something better, like ethernet.
 

Offline SimonTopic starter

  • Global Moderator
  • *****
  • Posts: 18613
  • Country: gb
  • Did that just blow up? No? might work after all !!
    • Simon's Electronics
Re: where do i start with learning about CAN implementation
« Reply #8 on: July 21, 2015, 05:50:14 am »
Try telling a vehicle manufacturer that I want to use ethernet instead of CAN  :box:

I don't have anything in particular to work on at the moment but it is clear that CAN manipulation is a vital skill if your doinf vehicle based stuff
 

Offline McBryce

  • Super Contributor
  • ***
  • Posts: 2760
  • Country: de
Re: where do i start with learning about CAN implementation
« Reply #9 on: July 21, 2015, 08:39:38 am »
Ethernet is being used quite a bit in vehicles these days, however it's replacing MOST, shovelling the high bandwidth data around the car. For basic control and inter-module comms you can't beat CAN. LIN is also still quite popular if speed isn't important. Flexray if you need realtime.

McBryce.
30 Years making cars more difficult to repair.
 

Offline kaz911

  • Super Contributor
  • ***
  • Posts: 1052
  • Country: gb
Re: where do i start with learning about CAN implementation
« Reply #10 on: July 21, 2015, 04:19:26 pm »
CAN is a transmission standard - so a bit like the TCP part of TCP/IP- where as the "content" (a bit like IP in TCP/IP) can be of different dialects  - like J1939, NMEA 2000 and about 500 company specific versions. (I know TCP is not the physical layer... like CAN is)

The most "used" semi standard CAN implementation is deviations of DeviceNet protocol and a lot of standards is more or less based on it. But almost all standards have "exceptions" - I work with NMEA 2000 which is the Marine Version of DeviceNet which have its own fun things going on. There are plenty of books on DeviceNet - but Kvaser has some pretty good documentation for their hardware and can be used as inspiration.
 

Offline G7PSK

  • Super Contributor
  • ***
  • Posts: 3918
  • Country: gb
  • It is hot until proved not.
« Last Edit: July 22, 2015, 09:29:54 am by G7PSK »
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf