Yahoo Groups archive

Lpc2000

Index last updated: 2026-04-28 23:31 UTC

Message

RE: [lpc2000] Re: Hello - Recomendations sought

2006-02-10 by Robert Adsett

At 02:50 PM 2/10/06 -0800, Joel Winarske wrote:
> > driver/isolator).  These
> > > are simpler than CAN AFAIK.  How noisy is the environment where
>
>CAN isn't difficult, some of the upper level protocols can be quite complex.
>
> > It'll be about 10 ft of wire between sensor and controller. There
> > doesn't need to be any other nodes on the network (at least that's
> > what they say now). Data payload is about 3 bytes every 5mS and it'll
> > be very noisy (automotive engine compartment) I suspect I could
> > design it robust enough so that single packet loss could be
> > tolerated.  Like I mentioned I have control over both ends of the
> > system, so it could be any interface I see fit. I was thinking that
> > CAN would be good for several reasons:
> > It's a standard
> > Noise resistant
> > Easy to add to in the future
>
>J1939 (CAN 250k Baud) is generally applied to this sort of concept: Heavy
>equipment, bus, etc.  But in your case it may be overkill.  You might
>consider microCANopen which I referenced in an earlier email would work
>quite well for what you need, without much modification.  License for code
>is ~$495.  www.canopenstore.com
>
>CAN would be a very good solution for your application.

I agree CAN looks like a good solution but from the description so far 
there is no need for anything as complex as CANopen.  Just reserve an 
identifier as the one to contain your data and set the CAN filters so that 
a specific CAN mailbox is reserved for that identifier.  Then read as it 
arrives.  If you want a little more security against reading the same value 
multiple times (a perfectly valid occurrence on CAN, especially in a noisy 
environment) add a field in the data to indicate which sample is being 
sent.  Go hog wild and reserve a whole byte for it.  If the byte is the 
same on two readings you know you've received the same entry twice.  If it 
skips a value you know you've dropped a sample.  Simple and reasonably 
robust. No need to implement a higher level protocol.

Personally I'd avoid the Microchip SPI based CAN chip, but a lot of that 
has to do with how I dislike their filtering mechanism.

Robert

" 'Freedom' has no meaning of itself.  There are always restrictions,   be 
they legal, genetic, or physical.  If you don't believe me, try to chew a 
radio signal. "  -- Kelvin Throop, III
http://www.aeolusdevelopment.com/

Attachments

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.