EmbeddedRelated.com
Forums
The 2024 Embedded Online Conference

CAN J1939 Help

Started by Neil January 28, 2006
Hi

I will be doing a J1939 project soon.
I need to :

1.pick a micro.
2.write or buy the stack.
3.figure out which doc I need to Buy from SAE.
4.Maybe get a Book?

On the micro I found
PICs
8052s
AVRs

Ulf tell me why I should go with Atmel (really!!)  Does Atmel have any 
appnotes or contracts in the U.S.  I have 8052 experience no AVR.

I have search the web. too much general info.
There is much better info on CANOpen.

Neil
> Neil
Neil wrote:
> > 1.pick a micro. > 2.write or buy the stack. > 3.figure out which doc I need to Buy from SAE.
It's all listed at the SAE site http://www.sae.org/standardsdev/groundvehicle/j1939.htm and some explanation can be found there: http://www.can-cia.org/j1939based/
> 4.Maybe get a Book?
> > On the micro I found > PICs > 8052s > AVRs >
definitely much more, from 8 to 32 bit, or any micro with external CAN controller. It all depends on your application. Regards Heinz
On Sat, 28 Jan 2006 05:55:49 GMT, Neil <NeilKurzm@worldnet.att.net>
wrote:

>Hi > >I will be doing a J1939 project soon. >I need to : > >1.pick a micro. >2.write or buy the stack. >3.figure out which doc I need to Buy from SAE. >4.Maybe get a Book? > >On the micro I found >PICs >8052s >AVRs
It may seem obvious but which processor you need depends on what you intend to do with it. The architecture is a consideration but only one among many (although I do find that I often need medical attention to un-clench my jaw muscles after working with classic PIC archs). The range of answers to your problem domain is exceedingly large. You will probably need to be more specific.
>Ulf tell me why I should go with Atmel (really!!) Does Atmel have any >appnotes or contracts in the U.S.
Their website, Digikey, AVRFreaks, many more.
>I have 8052 experience no AVR.
Which is a factor but not necessarily the deciding one. Is this a school project, a hobby project, or the main controller for the braking system of a 320-ton truck? -- Rich Webb Norfolk, VA
Rich Webb wrote:
> On Sat, 28 Jan 2006 05:55:49 GMT, Neil <NeilKurzm@worldnet.att.net> > wrote: > >> Hi >> >> I will be doing a J1939 project soon. >> I need to : >> >> 1.pick a micro. >> 2.write or buy the stack. >> 3.figure out which doc I need to Buy from SAE. >> 4.Maybe get a Book? >> >> On the micro I found >> PICs >> 8052s >> AVRs > > It may seem obvious but which processor you need depends on what you > intend to do with it. The architecture is a consideration but only one > among many (although I do find that I often need medical attention to > un-clench my jaw muscles after working with classic PIC archs). > > The range of answers to your problem domain is exceedingly large. You > will probably need to be more specific. > >> Ulf tell me why I should go with Atmel (really!!) Does Atmel have any >> appnotes or contracts in the U.S. > > Their website, Digikey, AVRFreaks, many more. > >> I have 8052 experience no AVR. > > Which is a factor but not necessarily the deciding one. > > Is this a school project, a hobby project, or the main controller for > the braking system of a 320-ton truck? >
The project is a large commercial battery. I need to talk to the SMBus chip in the battery and respond to status requests on the J1939 CAN bus . I am "assuming" 8 bits will be enough The protocol will be the largest part.. (The PIC is an PIC18F the architecture is better). I found much info on CANOpen, less on J1939. The SAE has a lot of information for sale, but which ones do I need?
Heinz-J&#4294967295;rgen Oertel wrote:
>> Neil > Neil wrote: >> 1.pick a micro. >> 2.write or buy the stack. >> 3.figure out which doc I need to Buy from SAE. > It's all listed at the SAE site > http://www.sae.org/standardsdev/groundvehicle/j1939.htm > and some explanation can be found there: > http://www.can-cia.org/j1939based/ >> 4.Maybe get a Book? > >> On the micro I found >> PICs >> 8052s >> AVRs >> > definitely much more, from 8 to 32 bit, or any micro with external CAN > controller. It all depends on your application. > > Regards > Heinz > >
Been there It tells about the documents. No details to make a decision with. I am going for 8bits with an integrated controller, unless the protocol needs more.
Neil wrote:

> Heinz-J&#4294967295;rgen Oertel wrote: >>> Neil >> Neil wrote: >>> 1.pick a micro. >>> 2.write or buy the stack. >>> 3.figure out which doc I need to Buy from SAE. >> It's all listed at the SAE site >> http://www.sae.org/standardsdev/groundvehicle/j1939.htm >> and some explanation can be found there: >> http://www.can-cia.org/j1939based/ >>> 4.Maybe get a Book? >> >>> On the micro I found >>> PICs >>> 8052s >>> AVRs >>> >> definitely much more, from 8 to 32 bit, or any micro with external CAN >> controller. It all depends on your application. >> >> Regards >> Heinz >> >> > > Been there It tells about the documents. No details to make a decision > with. I am going for 8bits with an integrated controller, unless the > protocol needs more.
On http://www.can-cia.org/j1939based/j1939/ the profile content is described. According you description I would assume that the SAE J1939/71 is what you need. Another source of information is clearly your J1939 communication partner. She should know what she expect from you. Heinz
Neil wrote:

> Heinz-J&#4294967295;rgen Oertel wrote: >>> Neil >> Neil wrote: >>> 1.pick a micro. >>> 2.write or buy the stack. >>> 3.figure out which doc I need to Buy from SAE. >> It's all listed at the SAE site >> http://www.sae.org/standardsdev/groundvehicle/j1939.htm >> and some explanation can be found there: >> http://www.can-cia.org/j1939based/ >>> 4.Maybe get a Book? >> >>> On the micro I found >>> PICs >>> 8052s >>> AVRs >>> >> definitely much more, from 8 to 32 bit, or any micro with external CAN >> controller. It all depends on your application. >> >> Regards >> Heinz >> >> > > Been there It tells about the documents. No details to make a decision > with. I am going for 8bits with an integrated controller, unless the > protocol needs more.
There is another page with different kind of information. http://www.can-wiki.info/SaeJ1939 May be that's missing a lot as well. But the good thing is, everybody can extend the content. It's a Wiki page. Heinz
On Sun, 29 Jan 2006 07:29:24 GMT, Neil <NeilKurzm@worldnet.att.net>
wrote:

>The project is a large commercial battery. I need to talk to the SMBus >chip in the battery and respond to status requests on the J1939 CAN bus >. I am "assuming" 8 bits will be enough The protocol will be the >largest part.. (The PIC is an PIC18F the architecture is better). I >found much info on CANOpen, less on J1939. The SAE has a lot of >information for sale, but which ones do I need?
Be happy that you're not required to implement it using CAN Kingdom. ;-) Eight bits should be plenty. Personally, I'd go with one of the CAN- enabled AVR chips since they have "TWI" (I2C-like) interface peripherals as well as the CAN entities. They're fast chips and comfortable for development. You might not need anything from SAE if the specs for the other devices that you'll be talking to are sufficiently detailed. A web-search for app notes and discussions should fill in any holes. I'd be okay with that for a "getting the feel of" level of project. However, this sounds like a commercial gig so I'd definitely recommend not being penny wise and pound foolish, and springing for the web subscription that SAE offers. It's only $600/year and is probably down in the noise for overall NRE costs. -- Rich Webb Norfolk, VA
On Sun, 29 Jan 2006 07:29:24 GMT, Neil <NeilKurzm@worldnet.att.net>
wrote:

>The project is a large commercial battery. I need to talk to the SMBus >chip in the battery and respond to status requests on the J1939 CAN bus >. I am "assuming" 8 bits will be enough The protocol will be the >largest part.. (The PIC is an PIC18F the architecture is better). I >found much info on CANOpen, less on J1939. The SAE has a lot of >information for sale, but which ones do I need?
At least there is a J1939 C-library available for PIC16 from Microchip. Paul
On Sat, 28 Jan 2006 05:55:49 GMT in comp.arch.embedded, Neil
<NeilKurzm@worldnet.att.net> wrote:

>Hi > >I will be doing a J1939 project soon. >I need to : > >1.pick a micro. >2.write or buy the stack. >3.figure out which doc I need to Buy from SAE. >4.Maybe get a Book?
It's worth the ~US$600 to get the web subscription for J1939 from SAE. That gets you the whole thing, plus a lot of useful supporting documents. It'll save you a great deal of guesswork -- and guessing wrong could be painful. The first thing you have to do when you connect to a J1939 bus is claim an address. In order to claim an address, you have to have a NAME. One field in the NAME is a manufacturer ID. If you don't have a manufacturer ID, you need to apply for one from the committee. It's fast, easy, and free, don't worry. Check the SAE web site. You'll want to see if your application is supported by existing PGNs and SPNs. If so, you just need to format the data with the proper SLOT, build the messages, and send them. And/or pick apart received messages. If your application is not supported, you'll probably want to implement some proprietary messages using PROP_A and PROP_B.
> >On the micro I found >PICs >8052s >AVRs
Make sure whatever controller you buy supports CAN 2.0B.
> >Ulf tell me why I should go with Atmel (really!!) Does Atmel have any >appnotes or contracts in the U.S. I have 8052 experience no AVR. > >I have search the web. too much general info. >There is much better info on CANOpen.
The SAE documents contain everything you need to know, from mechanical to electrical to software. It really is worth going to the standard documents themselves. They're not tutorial, but they are pretty clear, as long as you can keep the terminology straight. If you can get (working!) source, it will be well worth your while. A former employer bought Vector-Cantech source for about $19k. It's quite good, though it could stand some sophistication in the address claiming algorithm (it's not arbitrary-address capable). Microchip offers free code for their chips, though I'm not sure how good it is, or what it supports, but ISTM that, unless it's complete cr*p, it would be better than nothing. FWIW, I'd look at a PIC18 and Microchip's code as a first approximation. I like AVRs better, but I'm a software guy, and the free code should be worth at least what you pay for it. HTH, -=Dave -- Change is inevitable, progress is not.

The 2024 Embedded Online Conference