<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en" xmlns="http://www.w3.org/2005/Atom"><title>Recent posts to Time Quanta, Baud Rate Prescaler on MCP2515</title><link href="https://forge.codesys.com/forge/talk/Runtime/thread/3215fa7bf3/" rel="alternate"/><link href="https://forge.codesys.com/forge/talk/Runtime/thread/3215fa7bf3/feed.atom" rel="self"/><id>https://forge.codesys.com/forge/talk/Runtime/thread/3215fa7bf3/</id><updated>2020-02-27T16:18:53.635000Z</updated><subtitle>Recent posts to Time Quanta, Baud Rate Prescaler on MCP2515</subtitle><entry><title>Time Quanta, Baud Rate Prescaler on MCP2515</title><link href="https://forge.codesys.com/forge/talk/Runtime/thread/3215fa7bf3/?limit=25#a090" rel="alternate"/><published>2020-02-27T16:18:53.635000Z</published><updated>2020-02-27T16:18:53.635000Z</updated><author><name>Kalyani-K</name><uri>https://forge.codesys.com/u/kalyani-k/</uri></author><id>https://forge.codesys.com8ee05e940e61d104728ec7872876852d157444e3</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hello everyone!&lt;/p&gt;
&lt;p&gt;The following is the description of the operation I am working on using CodeSYS:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;What&lt;/strong&gt; : Interfacing NiRen CAN interface with Raspberry PI B+&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Why&lt;/strong&gt; : To have RasPI behave like a transmitting node on the CAN bus.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;How&lt;/strong&gt; : MCP2515 connected to the Raspberry PI via SPI interface &lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Questions&lt;/strong&gt; : &lt;br/&gt;
1.1. Per the MCP2515 datasheet, every bit has a bit construction, which is mainly associated with the TIME QUANTA (TQ). &lt;br/&gt;
       The formula for TQ being &lt;br/&gt;
&lt;strong&gt; TQ = 2.BRP.Tosc&lt;/strong&gt;&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;   &lt;span class="n"&gt;What&lt;/span&gt; &lt;span class="k"&gt;is&lt;/span&gt; &lt;span class="n"&gt;the&lt;/span&gt; &lt;span class="n"&gt;BRP&lt;/span&gt;&lt;span class="o"&gt;?&lt;/span&gt; 
   &lt;span class="n"&gt;What&lt;/span&gt; &lt;span class="k"&gt;is&lt;/span&gt; &lt;span class="n"&gt;Tosc&lt;/span&gt;&lt;span class="o"&gt;?&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;1.2. How do you select the oscillator frequency for using it in the program?&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;In the configuration register for MCP2515, how do you determine and set the values of BRP bits?&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;How do you decide upon the values for SJW, PROP_SEG, PH_SEG1, PH_SEG2 and Sampling point?&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Any bit of information on the above mentioned queries will be highly appreciated.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;(PS: I am NOT using the CAN bus example available on CodeSYS)&lt;/strong&gt;&lt;/p&gt;&lt;/div&gt;</summary></entry></feed>