where do i start with learning about CAN implementation - Page 1
Forum section: electronics / beginners

author: Simon
author_rank: Unknown
timestamp: July 16, 2015, 09:59:14 am
content: 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 ?

author: filssavi
author_rank: Frequent Contributor
timestamp: July 16, 2015, 10:45:37 am
content: 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

author: Wilksey
author_rank: Super Contributor
timestamp: July 16, 2015, 10:48:50 am
content: Are you talking about CAN in general or CAN for automotive diagnostics?

author: Simon
author_rank: Unknown
timestamp: July 16, 2015, 11:05:39 am
content: 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.

author: McBryce
author_rank: Super Contributor
timestamp: July 16, 2015, 11:29:59 am
content: 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.

author: AndyC_772
author_rank: Super Contributor
timestamp: July 16, 2015, 11:40:47 am
content: Quote from: Simon on July 16, 2015, 11:05:39 amYou'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 aPCAN, and go from there. I found getting up and running on an STM32 surprisingly painless.

author: Simon
author_rank: Unknown
timestamp: July 16, 2015, 11:44:37 am
content: 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.

author: leblanc
author_rank: Regular Contributor
timestamp: July 20, 2015, 11:49:23 pm
content: 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.

author: Simon
author_rank: Unknown
timestamp: July 21, 2015, 05:50:14 am
content: Try telling a vehicle manufacturer that I want to use ethernet instead of CANI 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

author: McBryce
author_rank: Super Contributor
timestamp: July 21, 2015, 08:39:38 am
content: 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.

author: kaz911
author_rank: Super Contributor
timestamp: July 21, 2015, 04:19:26 pm
content: 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.

author: G7PSK
author_rank: Super Contributor
timestamp: July 22, 2015, 09:17:53 am
content: Here.http://inst.cs.berkeley.edu/~ee249/fa08/Lectures/handout_canbus2.pdf[/urlhttpor.//www.kvaser.com/about-can/the-can-protocol/The standards are also available straight from Bosch freely.