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?
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?
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.
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.
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.
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.
$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.
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.
ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here.
All logos and trade names are the property of their respective owners.