<?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>8-bit MicrocontrollersのトピックRe: Baud rate selection using internal clock for ESCI</title>
    <link>https://community.nxp.com/t5/8-bit-Microcontrollers/Baud-rate-selection-using-internal-clock-for-ESCI/m-p/131828#M2839</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;P&gt;i am using qb4 device plz suggest all the setting with procedure ..&lt;/P&gt;&lt;P&gt;thanks and regards&lt;/P&gt;&lt;P&gt;pallav&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 08 Apr 2006 21:16:31 GMT</pubDate>
    <dc:creator>pallav</dc:creator>
    <dc:date>2006-04-08T21:16:31Z</dc:date>
    <item>
      <title>Baud rate selection using internal clock for ESCI</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/Baud-rate-selection-using-internal-clock-for-ESCI/m-p/131826#M2837</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;Hi,&lt;/DIV&gt;&lt;DIV&gt;plz guide how will i be able to configure my esci module for RX/TX @ 19200 or 9600 baud , i want to use internal clock. plz tell me the configuration details req.also if it is possible to get 0%error bauds using internal clock or not.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;thanks &amp;amp; regards&lt;/DIV&gt;&lt;DIV&gt;Pallav aggarwal&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 08 Apr 2006 16:38:04 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/Baud-rate-selection-using-internal-clock-for-ESCI/m-p/131826#M2837</guid>
      <dc:creator>pallav</dc:creator>
      <dc:date>2006-04-08T16:38:04Z</dc:date>
    </item>
    <item>
      <title>Re: Baud rate selection using internal clock for ESCI</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/Baud-rate-selection-using-internal-clock-for-ESCI/m-p/131827#M2838</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;P&gt;Hi Pallav,&lt;/P&gt;&lt;P&gt;The baudrate is simply just divided from the bus clock&lt;/P&gt;&lt;P&gt;baudrate = BUSCLK/16*BR&lt;/P&gt;&lt;P&gt;with high buss clockrates and lower baudrates you can usually get pretty accurate baudrate. To give the exact answer we need to know the actual device as the ICG's vary between devices.&lt;/P&gt;&lt;P&gt;BR Peg&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 08 Apr 2006 19:28:12 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/Baud-rate-selection-using-internal-clock-for-ESCI/m-p/131827#M2838</guid>
      <dc:creator>peg</dc:creator>
      <dc:date>2006-04-08T19:28:12Z</dc:date>
    </item>
    <item>
      <title>Re: Baud rate selection using internal clock for ESCI</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/Baud-rate-selection-using-internal-clock-for-ESCI/m-p/131828#M2839</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;P&gt;i am using qb4 device plz suggest all the setting with procedure ..&lt;/P&gt;&lt;P&gt;thanks and regards&lt;/P&gt;&lt;P&gt;pallav&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 08 Apr 2006 21:16:31 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/Baud-rate-selection-using-internal-clock-for-ESCI/m-p/131828#M2839</guid>
      <dc:creator>pallav</dc:creator>
      <dc:date>2006-04-08T21:16:31Z</dc:date>
    </item>
    <item>
      <title>Re: Baud rate selection using internal clock for ESCI</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/Baud-rate-selection-using-internal-clock-for-ESCI/m-p/131829#M2840</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;P&gt;Hi Pallav,&lt;/P&gt;&lt;P&gt;OK, so its more difficult than usual.&lt;/P&gt;&lt;P&gt;baudrate = busclk/64*BPD*BD*(PD+PDFA)&lt;/P&gt;&lt;P&gt;so if you use the fastest internal clock of 12.8MHz which gives a buss of 3.2MHz.&lt;/P&gt;&lt;P&gt;Then you use BPD = 1, BD = 1 and PD = 5 and PDFA = 31/32.&lt;/P&gt;&lt;P&gt;This gives a baudrate of 9687.5 (0.91% high)&lt;/P&gt;&lt;P&gt;When you trim the 12.8MHz osc use a trim 5 lower than suggested which will give you 1% low.&lt;/P&gt;&lt;P&gt;Now you get 9590.6 baud (0.1%low)&lt;/P&gt;&lt;P&gt;You have lots of possibilities here, I would suggest a spreadsheet.&lt;/P&gt;&lt;P&gt;Fudging the clock might screw up other clock related tasks also!&lt;/P&gt;&lt;P&gt;BR Peg&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 09 Apr 2006 12:45:52 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/Baud-rate-selection-using-internal-clock-for-ESCI/m-p/131829#M2840</guid>
      <dc:creator>peg</dc:creator>
      <dc:date>2006-04-09T12:45:52Z</dc:date>
    </item>
    <item>
      <title>Re: Baud rate selection using internal clock for ESCI</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/Baud-rate-selection-using-internal-clock-for-ESCI/m-p/131830#M2841</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;Hello Pallav &amp;amp; Peg,&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;The calculation of ESCI baud rate for the QB devices, as shown in the data sheet, seems rather convoluted to me - I think it can be done somewhat more simply and directly.&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;Firstly, the required overall division ratio DIV is given by either &lt;FONT face="Courier New"&gt;(Bus_freq/Baud_rate)&lt;/FONT&gt; or &lt;FONT face="Courier New"&gt;(CGMXCLK/Baud_rate)&lt;/FONT&gt; as determined by CONFIG2 setting.&amp;nbsp; Since CGMXCLK is four times Bus_freq, CGMXCLK would be used as the baud rate source for higher baud rates - either 4.0 MHz (default), 8.0 MHz or 13.2 MHz for the internal oscillator.&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;There are two registers that control baud rate division, the baud rate register (SCBR) and the prescaler register (SCPSC).&amp;nbsp; For the relatively high baud rates using the internal oscillator, and for better flexibility, the prescaler register might generally be used alone, and the baud rate register set for unity division ratio (SCBR = 0).&amp;nbsp; However, there is one special case for CGMXCLK = 8 MHz that may be a useful - 9600 baud should be achieved with reasonable accuracy, using the settings SCBR = 0xC0 and SCPSC = 0.&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;For the more general case using the prescaler, the modified formula would be&lt;BR /&gt;&lt;FONT face="Courier New"&gt;DIV = 2*SCPSC + 64&lt;/FONT&gt; where &lt;FONT face="Courier New"&gt;SCPSC&lt;/FONT&gt; is the value&amp;nbsp; contained in the SCPSC register, (and assumes BPD = 1 and BD = 1).&amp;nbsp;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;So to directly calculate the register value&amp;nbsp; &lt;FONT face="Courier New"&gt;SCPSC = (DIV-64)/2;&lt;BR /&gt;&lt;/FONT&gt;The minimum limits on this formula (for the prescaler to be operational) are&lt;BR /&gt;&lt;FONT face="Courier New"&gt;SCPSC &amp;gt;= 32&lt;/FONT&gt; and &lt;FONT face="Courier New"&gt;DIV &amp;gt;= 128&lt;/FONT&gt;.&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;For example, 19200 baud for CGMXCLK = 4.0 MHz, DIV = 208 (the nearest even number), and SCPSC = 72 (0x48). This gives 19231 baud.&amp;nbsp; Of course, if the calculated SCPSC value should exceed 255, SCBR register will need to be changed (from zero) to further divide the baud clock, and reduce the required SCPSC value.&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;&amp;nbsp;As far as adjustment of the trimming value for the external oscillator, it will need to be adjusted for the correct nominal frequency.&amp;nbsp; But further adjustment beyond this to manipulate the precise baud rate may be misplaced if the nominal baud rate is within one percent of the correct value.&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;Bear in mind that there can be +/-2 percent variation of internal clock frequency over temperature and supply voltage range.&amp;nbsp; I am somewhat reluctant to use the ESCI with the internal oscillator for this reason, especially if both ends of the serial link would be subject to similar uncertainty (and could potentially move in opposite directions), or where the design needs to be robust.&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;I wonder if it would be possible to devise a auto-calibration scheme, perhaps using the arbiter module, to sense the timing of the incoming data stream as a reference.&amp;nbsp; This could permit errors to be determined, and minor corrections to be made "on the fly".&amp;nbsp; Maybe someone has already done this.&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;Regards,&lt;BR /&gt;Mac&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;P&gt;Message Edited by bigmac on &lt;SPAN class="date_text"&gt;04-10-2006&lt;/SPAN&gt;&lt;SPAN class="time_text"&gt;01:11 AM&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 09 Apr 2006 22:08:24 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/Baud-rate-selection-using-internal-clock-for-ESCI/m-p/131830#M2841</guid>
      <dc:creator>bigmac</dc:creator>
      <dc:date>2006-04-09T22:08:24Z</dc:date>
    </item>
  </channel>
</rss>

