<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://community.arm.com/utility/feedstylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Code for CAN</title><link>https://community.arm.com/developer/tools-software/tools/f/keil-forum/25012/code-for-can</link><description> 
Hai I require simple c code for transmit and receive throuh CAN1
and CAN2 in LPC2129 . 
Please send some sample to me 
 </description><dc:language>en-US</dc:language><generator>Telligent Community 10</generator><item><title>RE: Code for CAN</title><link>https://community.arm.com/thread/144591?ContentTypeID=1</link><pubDate>Fri, 17 Apr 2009 00:05:14 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:6aea2f74-bbda-4753-8711-161d09127fe1</guid><dc:creator>Andy Neil</dc:creator><description>&lt;p&gt;&lt;p&gt;
&lt;i&gt;&amp;quot;I am using LPC2100 development board&amp;quot;&lt;/i&gt;&lt;/p&gt;

&lt;p&gt;
What &amp;quot;LPC2100 development board&amp;quot;?&lt;br /&gt;
Do you suppose that there is only 1 type of LPC2100 development board
in existence anywhere in the whole world?!&lt;/p&gt;

&lt;p&gt;
And how do you suppose that the data emitted from CAN2 will arrive
at CAN1 without any physical connection between the two?&lt;br /&gt;
Have you looked at the board schematic?&lt;/p&gt;

&lt;p&gt;
Are you familiar with the basic hardware operation of CAN?&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Code for CAN</title><link>https://community.arm.com/thread/142290?ContentTypeID=1</link><pubDate>Thu, 16 Apr 2009 21:10:37 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:d4f72ebd-0bb2-4084-8fb9-47702bd371a7</guid><dc:creator>martin martin</dc:creator><description>&lt;p&gt;&lt;p&gt;
I am using LPC2100 development board. My task is to send two types
of data on CAN2 and receive them from CAN1. Data_1 is ADC output
which is sent continuously. when EINT1 invoked data_2 send which is
high priority.&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Code for CAN</title><link>https://community.arm.com/thread/139136?ContentTypeID=1</link><pubDate>Thu, 16 Apr 2009 06:06:44 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:a115bee4-c44d-47fd-8c86-0b9e72e6867d</guid><dc:creator>Andy Neil</dc:creator><description>&lt;p&gt;&lt;p&gt;
What board?&lt;/p&gt;

&lt;p&gt;
Is what connected to what?&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Code for CAN</title><link>https://community.arm.com/thread/130464?ContentTypeID=1</link><pubDate>Thu, 16 Apr 2009 05:56:06 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:9ae7e40a-a322-4829-8fc7-a22a72b1d9ff</guid><dc:creator>martin martin</dc:creator><description>&lt;p&gt;&lt;p&gt;
Yes I could understand .Let me try with that code.&lt;br /&gt;
And I thought some problem with my board.&lt;br /&gt;
I want to confirm one thing that wheather we have connect the port by
wire or is it connected in board itself?&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Code for CAN</title><link>https://community.arm.com/thread/125392?ContentTypeID=1</link><pubDate>Thu, 16 Apr 2009 05:35:10 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:856013f3-22dd-4425-abd4-a34fb21db1ac</guid><dc:creator>Andy Neil</dc:creator><description>&lt;p&gt;&lt;p&gt;
Isn&amp;#39;t that the way you&amp;#39;d do it on an 8051?&lt;/p&gt;

&lt;p&gt;
Think about writing a string to the UART - wouldn&amp;#39;t you naturally
put the string into a buffer, and then have a function that works
through the buffer, sending each character in turn?&lt;/p&gt;

&lt;p&gt;
Like this:&lt;/p&gt;

&lt;pre&gt;
void main( void )
{
   uart_init();
   printf( &amp;quot;Hello, World!&amp;quot; );
}
&lt;/pre&gt;

&lt;p&gt;
Or would you actually write something like this:&lt;/p&gt;

&lt;pre&gt;
void main( void )
{
   uart_init();
   SBUF = &amp;#39;H&amp;#39;;
   while( !TI ) /* wait for TI */;
   SBUF = &amp;#39;e&amp;#39;;
   while( !TI ) /* wait for TI */;
   SBUF = &amp;#39;l&amp;#39;;
   while( !TI ) /* wait for TI */;
   SBUF = &amp;#39;l&amp;#39;;
   while( !TI ) /* wait for TI */;
   SBUF = &amp;#39;o&amp;#39;;
   while( !TI ) /* wait for TI */;
   SBUF = &amp;#39;,&amp;#39;;
   while( !TI ) /* wait for TI */;
   SBUF = &amp;#39; &amp;#39;;
   while( !TI ) /* wait for TI */;
   SBUF = &amp;#39;W&amp;#39;;
   while( !TI ) /* wait for TI */;
   SBUF = &amp;#39;o&amp;#39;;
   while( !TI ) /* wait for TI */;
   SBUF = &amp;#39;r&amp;#39;;
   while( !TI ) /* wait for TI */;
   SBUF = &amp;#39;l&amp;#39;;
   while( !TI ) /* wait for TI */;
   SBUF = &amp;#39;d&amp;#39;;
   while( !TI ) /* wait for TI */;
   SBUF = &amp;#39;!&amp;#39;;
}
&lt;/pre&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Code for CAN</title><link>https://community.arm.com/thread/114863?ContentTypeID=1</link><pubDate>Thu, 16 Apr 2009 04:50:29 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:bb7e5021-cc85-46b9-9b77-1a765d6eab1e</guid><dc:creator>martin martin</dc:creator><description>&lt;p&gt;&lt;p&gt;
Thank you for response.&lt;br /&gt;
Actually in none of the sample codes Registers are directly used.
Some buffres pointers ,arrays used. So i can&amp;#39;t find where data
transmitted and received&lt;/p&gt;

&lt;p&gt;
If registres directly used it will be easy,I think..&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Code for CAN</title><link>https://community.arm.com/thread/103048?ContentTypeID=1</link><pubDate>Thu, 16 Apr 2009 04:39:51 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:b3113cb5-520a-49c7-98e2-d69eb8ddbcaf</guid><dc:creator>Andy Neil</dc:creator><description>&lt;p&gt;&lt;p&gt;
Of course it can!&lt;/p&gt;

&lt;p&gt;
The only thing that actually has any effect on the processor is
accessing the registers!&lt;/p&gt;

&lt;p&gt;
After a month&amp;#39;s reading the datasheet, you should know what the
registers are, and what they do;&lt;/p&gt;

&lt;p&gt;
Looking at the example code should show how they are used.&lt;/p&gt;

&lt;p&gt;
In what way did you find the examples &amp;quot;too complicated&amp;quot;?&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Code for CAN</title><link>https://community.arm.com/thread/130465?ContentTypeID=1</link><pubDate>Thu, 16 Apr 2009 04:19:35 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:46a07731-8ec9-401c-a39e-59a22a6cd70c</guid><dc:creator>martin martin</dc:creator><description>&lt;p&gt;&lt;p&gt;
A month&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Code for CAN</title><link>https://community.arm.com/thread/125394?ContentTypeID=1</link><pubDate>Thu, 16 Apr 2009 04:15:48 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:a422880d-9eda-4936-8d74-11a2bee7ea70</guid><dc:creator>Tamiryan Michael</dc:creator><description>&lt;p&gt;&lt;p&gt;
martin martin martin martin,&lt;/p&gt;

&lt;p&gt;
&lt;i&gt;Nearly I had spent some 3weeks on the code.&lt;/i&gt;&lt;/p&gt;

&lt;p&gt;
how long did you spend learning the &lt;b&gt;data sheet&lt;/b&gt; of your new
hardware?&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Code for CAN</title><link>https://community.arm.com/thread/114862?ContentTypeID=1</link><pubDate>Thu, 16 Apr 2009 04:11:42 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:db1f7dda-5357-4944-b210-76aeabb1ec3d</guid><dc:creator>martin martin</dc:creator><description>&lt;p&gt;&lt;p&gt;
As, i am just from 8051 to ARM programming ,That example codes
found more complex. Nearly I had spent some 3weeks on the code.&lt;/p&gt;

&lt;p&gt;
In that the BlinkyCAN example... to test in board have i to
connect the CAN ports by wires(CAN_h and CAN_L of 1 and 2)&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Code for CAN</title><link>https://community.arm.com/thread/103055?ContentTypeID=1</link><pubDate>Thu, 16 Apr 2009 04:01:51 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:4939af80-da67-41f4-b216-98bf8c04103a</guid><dc:creator>ImPer Westermark</dc:creator><description>&lt;p&gt;&lt;p&gt;
So then I repeat my question: HOw much time have you spent looking
at the sample code available from the NXP web site?&lt;/p&gt;

&lt;p&gt;
Why don&amp;#39;t you think that the sample code do use the CAN by
directly using the CAN registers?&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Code for CAN</title><link>https://community.arm.com/thread/77368?ContentTypeID=1</link><pubDate>Thu, 16 Apr 2009 03:39:54 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:ce5f9b14-095a-4aa6-bb00-dd32e05247d9</guid><dc:creator>martin martin</dc:creator><description>&lt;p&gt;&lt;p&gt;
Sorry .. I need some simple codes for CAN for LPC2129. Can&amp;#39;t it be
done by directly using the CAN registers?&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Code for CAN</title><link>https://community.arm.com/thread/103052?ContentTypeID=1</link><pubDate>Thu, 16 Apr 2009 01:37:30 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:94c89fd7-2482-478c-ba43-2f7ebcbc12de</guid><dc:creator>Andy Neil</dc:creator><description>&lt;p&gt;&lt;p&gt;
Or even looking at the samples, etc, already available on this
very site?&lt;/p&gt;

&lt;p&gt;
&lt;a href="http://www.keil.com/download/list/arm.htm"&gt;http://www.keil.com/download/list/arm.htm&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;
&lt;a href="http://www.keil.com/can/"&gt;http://www.keil.com/can/&lt;/a&gt;&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Code for CAN</title><link>https://community.arm.com/thread/89687?ContentTypeID=1</link><pubDate>Thu, 16 Apr 2009 01:28:42 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:ae13caf8-2de1-46f8-bef9-8993ffa39717</guid><dc:creator>ImPer Westermark</dc:creator><description>&lt;p&gt;&lt;p&gt;
How much time have you spent looking at the sample code available
from the chip manufacturer?&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Code for CAN</title><link>https://community.arm.com/thread/55860?ContentTypeID=1</link><pubDate>Thu, 16 Apr 2009 01:27:34 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:4fc4f4b4-acd2-47e1-b50b-0d67e61b627f</guid><dc:creator>Tamiryan Michael</dc:creator><description>&lt;p&gt;&lt;p&gt;
You &amp;quot;require&amp;quot;. I think you will get better results by actually
demanding.&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>