<?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>LPCXpresso IDE中的主题 Re: frecuency example I2C LPC1114</title>
    <link>https://community.nxp.com/t5/LPCXpresso-IDE/frecuency-example-I2C-LPC1114/m-p/568953#M19495</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by german on Wed Apr 07 08:57:10 MST 2010&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Dear Member,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm trying to read a LM75 temperature I2C sensor. (I2C max frecuency --&amp;gt; 100KHZ) interconnected to a LPC1111/101.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I used the internal oscilator (12 MHz) therefore a 12 MHz I2C_PCLK is set.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I used the register values from UM page130 (Table 145. I2SCLL + I2SCLH values for selected I2C clock values) to set a I2C bit frecuency of 100 KHz.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I2SCLL =120; //it's 120 decimal o hex value?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I2SCLH =120; //it's 120 decimal o hex value?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Are these configuration values correct?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Could i use directly the example i2ctest.c to read the temperature with this changes?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; I2CWriteLength = 1;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; I2CReadLength =&amp;nbsp; 2;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; I2CMasterBuffer[0] = LM75_ADDR | RD_BIT;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; I2CEngine();&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Finally, where's the readed temperature values?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks in advance.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 16 Jun 2016 02:23:47 GMT</pubDate>
    <dc:creator>lpcware</dc:creator>
    <dc:date>2016-06-16T02:23:47Z</dc:date>
    <item>
      <title>frecuency example I2C LPC1114</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/frecuency-example-I2C-LPC1114/m-p/568951#M19493</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by thinkchip on Sun Apr 04 16:34:18 MST 2010&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Hi, I want to know how to set the frecuency work in the example in lpcxpresso? I want to work at frecuency 100KHz&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Jun 2016 02:23:46 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/frecuency-example-I2C-LPC1114/m-p/568951#M19493</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-16T02:23:46Z</dc:date>
    </item>
    <item>
      <title>Re: frecuency example I2C LPC1114</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/frecuency-example-I2C-LPC1114/m-p/568952#M19494</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by hfischer on Tue Apr 06 01:20:22 MST 2010&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Hi thinkchip,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;look at UM page 129 section 10.7.5.1&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;This example could be rearrange to the value you need to write in the divider register.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I2Cbitfrequency = I2CPCLK / (I2CSCLH + I2CSCLL)&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Jun 2016 02:23:46 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/frecuency-example-I2C-LPC1114/m-p/568952#M19494</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-16T02:23:46Z</dc:date>
    </item>
    <item>
      <title>Re: frecuency example I2C LPC1114</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/frecuency-example-I2C-LPC1114/m-p/568953#M19495</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by german on Wed Apr 07 08:57:10 MST 2010&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Dear Member,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm trying to read a LM75 temperature I2C sensor. (I2C max frecuency --&amp;gt; 100KHZ) interconnected to a LPC1111/101.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I used the internal oscilator (12 MHz) therefore a 12 MHz I2C_PCLK is set.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I used the register values from UM page130 (Table 145. I2SCLL + I2SCLH values for selected I2C clock values) to set a I2C bit frecuency of 100 KHz.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I2SCLL =120; //it's 120 decimal o hex value?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I2SCLH =120; //it's 120 decimal o hex value?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Are these configuration values correct?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Could i use directly the example i2ctest.c to read the temperature with this changes?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; I2CWriteLength = 1;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; I2CReadLength =&amp;nbsp; 2;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; I2CMasterBuffer[0] = LM75_ADDR | RD_BIT;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; I2CEngine();&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Finally, where's the readed temperature values?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks in advance.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Jun 2016 02:23:47 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/frecuency-example-I2C-LPC1114/m-p/568953#M19495</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-16T02:23:47Z</dc:date>
    </item>
    <item>
      <title>Re: frecuency example I2C LPC1114</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/frecuency-example-I2C-LPC1114/m-p/568954#M19496</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by hfischer on Wed Apr 07 23:22:54 MST 2010&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Hi german,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;if you use the startup code from the cmsis you could use the defines generated in there. A macro like &lt;/SPAN&gt;&lt;BR /&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD bgcolor="#cacaca"&gt; &lt;PRE&gt;
#define I2BITFREQ&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 400000
#define I2SCLH_SCLH&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (__SYSTEM_CLOCK/(2*I2BITFREQ)) /* I2C SCL Duty Cycle High Reg */
#define I2SCLL_SCLL&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (__SYSTEM_CLOCK/(2*I2BITFREQ))&amp;nbsp; /* I2C SCL Duty Cycle Low Reg */
&lt;/PRE&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;BR /&gt;&lt;SPAN&gt;would probably the best way, to save wrong oscillator configurations. But think about changing them on runtime &lt;SPAN class="lia-unicode-emoji" title=":winking_face:"&gt;&lt;LI-EMOJI id="lia_winking-face" title=":winking_face:"&gt;&lt;/LI-EMOJI&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;But in the explicit problem with 12MHz and a wished I2C Freq of 100kHz you have a factor of 2 to much in your values.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;If you set SCLH= SCLL you get easy values which results in the values for SCLH=SCLL=60 (dec).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;HR /&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;STRONG&gt;Quote: &lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;Could i use directly the example i2ctest.c to read the temperature with this changes?&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp; I2CWriteLength = 1;&lt;BR /&gt;&amp;nbsp; I2CReadLength =&amp;nbsp; 2;&lt;BR /&gt;&amp;nbsp; I2CMasterBuffer[0] = LM75_ADDR | RD_BIT;&lt;BR /&gt;&amp;nbsp; I2CEngine();&lt;BR /&gt;&lt;BR /&gt;Finally, where's the readed temperature values?&lt;BR /&gt;&lt;/SPAN&gt;&lt;HR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Here the read data will be in the I2CMasterBuffer on the through the ReadLength assigned index. So you can expect the data on index 1 and 2.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Hope i am right with all and it will help you.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Greetings&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Jun 2016 02:23:47 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/frecuency-example-I2C-LPC1114/m-p/568954#M19496</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-16T02:23:47Z</dc:date>
    </item>
  </channel>
</rss>

