<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic LPC11C24 CAN explanation: explain like I'm five in LPC Microcontrollers</title>
    <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC11C24-CAN-explanation-explain-like-I-m-five/m-p/530609#M10040</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by andreibuiza on Mon Nov 03 20:59:24 MST 2014&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Hello all,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I've been spending a lot of time trying to figure out how to use CAN. All I need to do is some basic transmit and receive functions but the documentation/sample code under LPCopen and LPC11C24 user guide is very hard to read. Note that I have never used CAN before, all I know is its general overview from Wikipedia.&amp;nbsp; I attached a snippet from the user manual which I think contains some info, and I also attached the LPCopen CAN code snippet. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Basically I'm confused on how to setup msg_obj, I already figured how to use the CAN functions, ie. LPC_CCAN_API-&amp;gt;can_transmit and LPC_CCAN_API-&amp;gt;config_rxmsgobj.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;My questions are: &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;what to do with msg_obj.msgobj?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;what to do with msg_obj.mode_id?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;what to do with msg_obj.mask?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Any form of guidance is deeply appreciated :) &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;MrBuggy. &lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 15 Jun 2016 19:29:56 GMT</pubDate>
    <dc:creator>lpcware</dc:creator>
    <dc:date>2016-06-15T19:29:56Z</dc:date>
    <item>
      <title>LPC11C24 CAN explanation: explain like I'm five</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC11C24-CAN-explanation-explain-like-I-m-five/m-p/530609#M10040</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by andreibuiza on Mon Nov 03 20:59:24 MST 2014&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Hello all,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I've been spending a lot of time trying to figure out how to use CAN. All I need to do is some basic transmit and receive functions but the documentation/sample code under LPCopen and LPC11C24 user guide is very hard to read. Note that I have never used CAN before, all I know is its general overview from Wikipedia.&amp;nbsp; I attached a snippet from the user manual which I think contains some info, and I also attached the LPCopen CAN code snippet. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Basically I'm confused on how to setup msg_obj, I already figured how to use the CAN functions, ie. LPC_CCAN_API-&amp;gt;can_transmit and LPC_CCAN_API-&amp;gt;config_rxmsgobj.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;My questions are: &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;what to do with msg_obj.msgobj?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;what to do with msg_obj.mode_id?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;what to do with msg_obj.mask?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Any form of guidance is deeply appreciated :) &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;MrBuggy. &lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 19:29:56 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC11C24-CAN-explanation-explain-like-I-m-five/m-p/530609#M10040</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T19:29:56Z</dc:date>
    </item>
    <item>
      <title>Re: LPC11C24 CAN explanation: explain like I'm five</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC11C24-CAN-explanation-explain-like-I-m-five/m-p/530610#M10041</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by 1234567890 on Tue Nov 04 04:26:22 MST 2014&lt;/STRONG&gt;&lt;BR /&gt;&lt;HR /&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;STRONG&gt;Quote: andreibuiza&lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;My questions are: &lt;BR /&gt;what to do with msg_obj.msgobj? =&amp;gt; Number of the message object (1-32)&lt;BR /&gt;what to do with msg_obj.mode_id? =&amp;gt; CAN-ID (11 or 29 bit)&lt;BR /&gt;what to do with msg_obj.mask? =&amp;gt; Mask for CAN-ID (what bits from CAN-ID must match)&lt;BR /&gt;MrBuggy.&lt;/SPAN&gt;&lt;HR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 19:29:57 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC11C24-CAN-explanation-explain-like-I-m-five/m-p/530610#M10041</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T19:29:57Z</dc:date>
    </item>
    <item>
      <title>Re: LPC11C24 CAN explanation: explain like I'm five</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC11C24-CAN-explanation-explain-like-I-m-five/m-p/530611#M10042</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by andreibuiza on Tue Nov 04 13:54:10 MST 2014&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Hi I'm sorry but I do not understand the mode_id and mask. In the LPC OPEN example code I attached in the first post, I can't see how it says its for 11 bit or 29 bit. Can you give me an example with explanation please? &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;mrBuggy&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 19:29:58 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC11C24-CAN-explanation-explain-like-I-m-five/m-p/530611#M10042</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T19:29:58Z</dc:date>
    </item>
    <item>
      <title>Re: LPC11C24 CAN explanation: explain like I'm five</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC11C24-CAN-explanation-explain-like-I-m-five/m-p/530612#M10043</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by 1234567890 on Tue Nov 04 14:36:50 MST 2014&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Indeed the UM could be a bit more precise in explanation. In another thread I 'adviced' to extend the example call on top of page 323 in UM10398 (Rev 12.3) to make it very clear:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;'original' example call should be:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;// Configure message object 1 to receive all 11-bit messages 0x000-0x00F&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;msg_obj.msgobj = 1;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;msg_obj.mode_id = 0x000 | CAN_MSGOBJ_STD;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;msg_obj.mask = 0x7F0;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;(*rom)-&amp;gt;pCAND-&amp;gt; config_rxmsgobj(&amp;amp;msg_obj);&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If you replace&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;msg_obj.mode_id = 0x000 | CAN_MSGOBJ_EXT;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;you use a 29-bit identifier instead. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;In detail: 0x7F0 is binary 0111 1111 0000. That means, the LSB of the identifier (binary 0000) isn't evaluated when receiving a message. Just when all your bits in the mask with '1' match the received identifier, the message is valid. A '0' in the mask means that this bit isn't relevant for that comparison.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Cave: But when you extend the identifier from 11 to 29 bits, you have to extend the mask as well.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;So the mask has to be extended from 11 bit 29 bit as well. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The 29 bit mask mustn't be 0x7F0. It must be...&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Your homework.&lt;/SPAN&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 19:29:58 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC11C24-CAN-explanation-explain-like-I-m-five/m-p/530612#M10043</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T19:29:58Z</dc:date>
    </item>
    <item>
      <title>Re: LPC11C24 CAN explanation: explain like I'm five</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC11C24-CAN-explanation-explain-like-I-m-five/m-p/530613#M10044</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by andreibuiza on Tue Nov 04 23:02:54 MST 2014&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Can you give an example for mask? I somewhat get your explanation but an example showing a transmitter node and a receiver node in a CAN network would help me very much! Thank youU! &lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 19:29:59 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC11C24-CAN-explanation-explain-like-I-m-five/m-p/530613#M10044</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T19:29:59Z</dc:date>
    </item>
    <item>
      <title>Re: LPC11C24 CAN explanation: explain like I'm five</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC11C24-CAN-explanation-explain-like-I-m-five/m-p/530614#M10045</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by 1234567890 on Mon Nov 10 09:51:47 MST 2014&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;&lt;SPAN&gt;Enjoy &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.nxp.com/external-link.jspa?url=http%3A%2F%2Fwww.lpcware.com%2Fcontent%2Fforum%2Flpc11c24-send-and-receive-an-extended-frame" rel="nofollow" target="_blank"&gt;http://www.lpcware.com/content/forum/lpc11c24-send-and-receive-an-extended-frame&lt;/A&gt;&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 19:29:59 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC11C24-CAN-explanation-explain-like-I-m-five/m-p/530614#M10045</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T19:29:59Z</dc:date>
    </item>
  </channel>
</rss>

