- CAN J1939 Help
- Posted by Neil on January 28th, 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
- Posted by Heinz-Jürgen Oertel on January 28th, 2006
http://www.sae.org/standardsdev/groundvehicle/j1939.htm
and some explanation can be found there:
http://www.can-cia.org/j1939based/
controller. It all depends on your application.
Regards
Heinz
- Posted by Rich Webb on January 28th, 2006
On Sat, 28 Jan 2006 05:55:49 GMT, Neil <NeilKurzm@worldnet.att.net>
wrote:
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.
Their website, Digikey, AVRFreaks, many more.
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
- Posted by Neil on January 29th, 2006
Rich Webb 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?
- Posted by Neil on January 29th, 2006
Heinz-Jürgen Oertel wrote:
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.
- Posted by Heinz-Jürgen Oertel on January 29th, 2006
Neil wrote:
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
- Posted by Heinz-Jürgen Oertel on January 29th, 2006
Neil wrote:
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
- Posted by Rich Webb on January 29th, 2006
On Sun, 29 Jan 2006 07:29:24 GMT, Neil <NeilKurzm@worldnet.att.net>
wrote:
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
- Posted by Paul Keinanen on January 29th, 2006
On Sun, 29 Jan 2006 07:29:24 GMT, Neil <NeilKurzm@worldnet.att.net>
wrote:
At least there is a J1939 C-library available for PIC16 from
Microchip.
Paul
- Posted by Dave Hansen on January 30th, 2006
On Sat, 28 Jan 2006 05:55:49 GMT in comp.arch.embedded, Neil
<NeilKurzm@worldnet.att.net> wrote:
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.
Make sure whatever controller you buy supports CAN 2.0B.
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.
- Posted by Neil on January 31st, 2006
Dave Hansen wrote:
$19K ?? That is a bit much for this project. I do not think the numbers
are there, but I am not the one that pays the bills.
Thanks for the Info about the SAE doc. I would hate to spend $600 for
not much. I was wondering if I should just get what I need and not the
whole set.
I am a software guy too. I was hoping to not have to learn another CPU
and compiler. At least not without a clear advantage.
Do you know of any books that cover the subject? I would be nice to
read ahead on the subject.
Thank you for the Information.
Neil
- Posted by Neil on January 31st, 2006
Heinz-Jürgen Oertel wrote:
- Posted by Dave Hansen on February 2nd, 2006
On Tue, 31 Jan 2006 05:34:58 GMT in comp.arch.embedded, Neil
<NeilKurzm@worldnet.att.net> wrote:
Well, it's fairly complete, guaranteed compliant, full source, and no
royalties. If you're doing several J1939 projects, or are on a tight
schedule, it's probably a bargain. But you're right -- you have to be
pretty serious about J1939 to make such an investment. And you'll
still have plenty of work to do, even with their code.
My first (and very fast-track) J1939 project used an unfamiliar chip,
and a somewhat familiar compiler (GCC). Everything was pretty much C,
and the hardwdare was a purchased (OEM) board, so that really wasn't a
problem.
No. I suspect there's several reasons for this: 1) the marketfor such
a book is pretty small, 2) thatmarket is going to want to have the SAE
standard anyway, 3) SAE might have something to say about the most
useful information you'd want to publish anyway, i.e., that tables of
PGNs, SPNs, etc.
The SAE standards aren't really tutorial, but they are far from the
most opaque standards I've run into. Most of the complicated stuff is
covered by the phrase "29-bit CAN." The topology, termination, and
connector information is very straightforward. Address claiming is
not all that complicated once you get over the number of words and
pictures dedicated to describing it. And the BAM and CTS/RTS
transport protocols are downright simple.
It's the tables that you can't do without. And you aren't going to
get them anywhere but SAE.
Regards,
-=Dave
--
Change is inevitable, progress is not.
- Posted by Neil on February 2nd, 2006
Dave Hansen wrote:
Dave
Thank you for the information.
At least I have somewhere to start now.
Neil
- Posted by Heinz-Jürgen Oertel on February 2nd, 2006
<veröffentlicht & per Mail versendet>
Neil wrote:
you can check Noregon http://www.noregon.com/
The J1939 stack http://noregon.safeshopper.com/5/6.htm?802
as available for about US$ 5000.
I never saw the product or the documentation, therfore I can not compare it
with Vector, but you can ask for it.
Best Regards
Heinz
- Posted by Neil on February 3rd, 2006
Heinz-Jürgen Oertel wrote:
Thanks I missed that one.
Neil