Quantcast

Setting CAN MASK & ID registers

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Setting CAN MASK & ID registers

Rotti, Prasad (IE10)

Hello,

 

Can we set the CAN Mask registers to accept only one particular ID? Say can I set the registers to accept only identifiers with lables 0x25 & 0x 86?

 

Rgrds,

Prasad

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Setting CAN MASK & ID registers

heikki.saha

Hi,

Assume we have 11-bit ID-space and 16-bit filters:

0x025: 0000 0000 0010 0101
0x086: 0000 0000 1000 0110

As we can see, we can use following acceptance register to filter.
CAN-ID bits of incoming frame are compared with the acceptance
register value:

Reg.:  0000 0000 0000 0100

And we have to don't care four bits which are different in those ID's.
Please note that '1' means don't care:

Mask:  0000 0000 1010 0011

So, with single filter we can not pass through only those two IDs.
Instead, we get following 16 (2^4) IDs, where additional ones shall be
filtered by SW:

0x004: 0000 0000 0000 0100
0x005: 0000 0000 0000 0101
0x006: 0000 0000 0000 0110
0x007: 0000 0000 0000 0111
0x024: 0000 0000 0010 0100
0x025: 0000 0000 0010 0101 <-- accepted
0x026: 0000 0000 0010 0110
0x027: 0000 0000 0010 0111
0x084: 0000 0000 1000 0100
0x085: 0000 0000 1000 0101
0x086: 0000 0000 1000 0110 <-- accepted
0x087: 0000 0000 1000 0111
0x0A4: 0000 0000 1010 0100
0x0A5: 0000 0000 1010 0101
0x0A6: 0000 0000 1010 0110
0x0A7: 0000 0000 1010 0111

If he had two or more filters, the nwe can pass through exactly those
two IDs.

Best regards,

-H
----------------------------------------------------------------------
Heikki Saha        Sandvik Mining and Construction Oy
M.Sc.              P.O. Box 100         Tel(dir): +358 (0)400 346 537
Research Engineer  FIN-33311 Tampere    Fax: +358 (0)205 44 120
Automation Systems Finland              Email: [hidden email]


This e-mail is confidential and it is intended only for the addressees. Any review, dissemination, distribution, or copying of this message by persons or entities other than the intended recipient is prohibited. If you have received this e-mail in error, kindly notify us immediately by telephone or e-mail and delete the message from your system. The sender does not accept liability for any errors or omissions in the contents of this message which may arise as a result of the e-mail transmission.







"Rotti, Prasad (IE10)" <[hidden email]>

Sent by: [hidden email]
16.01.2008 15:32
Please respond to
[hidden email]

To
<[hidden email]>
cc
Subject
[CANLIST] Setting CAN MASK & ID registers






Hello,

 

Can we set the CAN Mask registers to accept only one particular ID? Say can I set the registers to accept only identifiers with lables 0x25 & 0x 86?

 

Rgrds,

Prasad
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

weirdness with MCP2515

Steve Letkeman-3
I have come across a particular combination that is causing the MCP2515
to act very strangely so either this is a really weird 1 in a million bug or I
am missing something simple.  I started some new software that for the
 most part is working perfectly and I am using my own CAN-4-USB/FX
interface (which uses the MCP2515)  but I started getting strange
behaviour on one particular message and narrowed it down to a particular
combination of ID and data bytes.  If I try to transmit a 29 bit ID of F-E0-0D-81
with 8 data bytes 04-53-77-69-74-63-68-20  the MCP2515 starts
acting very strange.  I have gone through the errata and there doesn't
seem to be an explanation, does anybody have any insight?  Does anybody
want to try this and confirm it?
Steve
 
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Patenting HLP or ID and Message content of CAN packets.

John Dammeyer
Message
Hi everyone,
 
I'm curious about the viability of some of the patents I've seen that have been granted on CAN message content.  Some of them appear to go as far as stating that if a CAN node is connected to a switch and it sends the switch status message to turn on a fluorescent ballast to turn on a light on a different node that this is patentable.
 
Comments?
 
I suspect it's mostly designed to intimidate with winner being the one with the deepest pockets for legal beagles but perhaps not?
 
John Dammeyer
 
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Patenting HLP or ID and Message content of CAN packets.

Bugzilla from robert.wood@apostrophe.co.uk
Seems like a crazy patent to me. Seems like it's similar to some of the
shenanigan that go on with software patents. Something that the States
should follow Europe's lead on and just ban them. They're plain evil.
Patents aren't worth a penny unless, as you intimate, you have loads of
money to defend it anyway.

John Dammeyer wrote:

> Hi everyone,
>  
> I'm curious about the viability of some of the patents I've seen that
> have been granted on CAN message content.  Some of them appear to go
> as far as stating that if a CAN node is connected to a switch and it
> sends the switch status message to turn on a fluorescent ballast to
> turn on a light on a different node that this is patentable.
>  
> Comments?
>  
> I suspect it's mostly designed to intimidate with winner being the one
> with the deepest pockets for legal beagles but perhaps not?
>  
> John Dammeyer
>  

--
Archives and useful links: http://groups.yahoo.com/group/CANbus
Subscribe and unsubscribe at www.vector-informatik.com/canlist/
Report any problems to <[hidden email]>
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

RE: weirdness with MCP2515

Allen Pothoof
In reply to this post by Steve Letkeman-3
Not having an MCP2515 to test with, would you like to define "acting strange?"  Or do you think that might bias someone else's attempt to replicate?
 
Regards,
Allen Pothoof



From: [hidden email]
To: [hidden email]
Subject: [CANLIST] weirdness with MCP2515
Date: Fri, 14 Mar 2008 09:21:54 -0600

I have come across a particular combination that is causing the MCP2515
to act very strangely so either this is a really weird 1 in a million bug or I
am missing something simple.  I started some new software that for the
 most part is working perfectly and I am using my own CAN-4-USB/FX
interface (which uses the MCP2515)  but I started getting strange
behaviour on one particular message and narrowed it down to a particular
combination of ID and data bytes.  If I try to transmit a 29 bit ID of F-E0-0D-81
with 8 data bytes 04-53-77-69-74-63-68-20  the MCP2515 starts
acting very strange.  I have gone through the errata and there doesn't
seem to be an explanation, does anybody have any insight?  Does anybody
want to try this and confirm it?
Steve
 


Windows Live Hotmail is giving away Zunes. Enter for your chance to win.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: weirdness with MCP2515

Steve Letkeman-3
In reply to this post by Steve Letkeman-3
well... how do I explain this without looking like a complete newb... ok, there isn't any!
I use a standard cat-5 wiring scheme for most of my CAN nodes that combines power
and CAN and I was using one of my 5 port CAN hubs as a power source for the other
nodes on the network.  What I forgot was that I had changed the baud rate on the 1 port
of the 5 port hub that I was using to power the rest of the network.  (I use power only
hubs and smart hubs on my bench) So while most of my network was running 500Kbps,
my smart hub port was set to 250Kbps.  The interesting thing is that there was no
errors showing up anywhere with the other nodes until that exact packet that I mentioned
in my original email, then the sender started showing errors but the packet itself wasn't
even making it to the other nodes which led me (falsely) to believe the packet had never
left the transmitter.  It wasn't until I put a scope on the bus that I figured out my mistake.
I have been doing this way to long to make that kind of mistake but I guess it happens.
Steve
 
>Not having an MCP2515 to test with, would you like to define "acting strange?"  Or do you think that might bias someone else's attempt to >replicate?
 
>Regards,
>Allen Pothoof


----- Original Message -----
Sent: Friday, March 14, 2008 9:21 AM
Subject: [CANLIST] weirdness with MCP2515

I have come across a particular combination that is causing the MCP2515
to act very strangely so either this is a really weird 1 in a million bug or I
am missing something simple.  I started some new software that for the
 most part is working perfectly and I am using my own CAN-4-USB/FX
interface (which uses the MCP2515)  but I started getting strange
behaviour on one particular message and narrowed it down to a particular
combination of ID and data bytes.  If I try to transmit a 29 bit ID of F-E0-0D-81
with 8 data bytes 04-53-77-69-74-63-68-20  the MCP2515 starts
acting very strange.  I have gone through the errata and there doesn't
seem to be an explanation, does anybody have any insight?  Does anybody
want to try this and confirm it?
Steve
 
Loading...