<?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>LPC MicrocontrollersのトピックI2C with MCP23008 in LPC1752</title>
    <link>https://community.nxp.com/t5/LPC-Microcontrollers/I2C-with-MCP23008-in-LPC1752/m-p/1073052#M41397</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;To use&amp;nbsp;external resistor mcp23008 is working perfectly. But I want to use an internal resistor. With internal resister it's not working.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;void I2CInit() {&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;LPC_GPIO0-&amp;gt;FIODIR0 |= 0x33; //P0.5 P0.4 P0.1 P0.0 ext pins 29,30,10,9&lt;BR /&gt; LPC_SC-&amp;gt;PCONP |= 1 &amp;lt;&amp;lt; 19; //re-enable POWER to I2C_2 if required&lt;BR /&gt; LPC_SC-&amp;gt;PCLKSEL1 |= 1&amp;lt;&amp;lt;6; //pclk = cclk&lt;BR /&gt; LPC_PINCON-&amp;gt;PINSEL0 |= 0x3&amp;lt;&amp;lt;0; //Pin P0.10 allocated to alternate function 2&lt;BR /&gt; LPC_PINCON-&amp;gt;PINSEL0 |= 0x3&amp;lt;&amp;lt;2; //Pin P0.11 allocated to alternate function 2&lt;BR /&gt; LPC_GPIO0-&amp;gt;FIODIR |= (1&amp;lt;&amp;lt;0); //Bit P0.10 an output&lt;BR /&gt; LPC_GPIO0-&amp;gt;FIODIR |= (1&amp;lt;&amp;lt;1); //Bit P0.11 an output&lt;BR /&gt; LPC_PINCON-&amp;gt;PINMODE0 &amp;amp;= ~(3&amp;lt;&amp;lt;0); //P0.10 has pull up/down resistor&lt;BR /&gt; //LPC_PINCON-&amp;gt;PINMODE0 |= (2&amp;lt;&amp;lt;0); //omit to use internal pull up&lt;BR /&gt; LPC_PINCON-&amp;gt;PINMODE0 &amp;amp;= ~(3&amp;lt;&amp;lt;2); //P0.11 has pull up/down resistor&lt;BR /&gt; //LPC_PINCON-&amp;gt;PINMODE0 |= (2&amp;lt;&amp;lt;2); //omit to use internal pull up&lt;BR /&gt; LPC_PINCON-&amp;gt;PINMODE_OD0 |= (1&amp;lt;&amp;lt;0); //Bit P0.10 is open drain&lt;BR /&gt; LPC_PINCON-&amp;gt;PINMODE_OD0 |= (1&amp;lt;&amp;lt;1); //Bit P0.11 is open drain&lt;BR /&gt; LPC_I2C1-&amp;gt;I2SCLH = 60; //100kHz from 12MHz&lt;BR /&gt; LPC_I2C1-&amp;gt;I2SCLL = 60; //100kHz from 12MHz&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;}&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 26 May 2020 03:01:27 GMT</pubDate>
    <dc:creator>jahid_sawikot</dc:creator>
    <dc:date>2020-05-26T03:01:27Z</dc:date>
    <item>
      <title>I2C with MCP23008 in LPC1752</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/I2C-with-MCP23008-in-LPC1752/m-p/1073052#M41397</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;To use&amp;nbsp;external resistor mcp23008 is working perfectly. But I want to use an internal resistor. With internal resister it's not working.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;void I2CInit() {&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;LPC_GPIO0-&amp;gt;FIODIR0 |= 0x33; //P0.5 P0.4 P0.1 P0.0 ext pins 29,30,10,9&lt;BR /&gt; LPC_SC-&amp;gt;PCONP |= 1 &amp;lt;&amp;lt; 19; //re-enable POWER to I2C_2 if required&lt;BR /&gt; LPC_SC-&amp;gt;PCLKSEL1 |= 1&amp;lt;&amp;lt;6; //pclk = cclk&lt;BR /&gt; LPC_PINCON-&amp;gt;PINSEL0 |= 0x3&amp;lt;&amp;lt;0; //Pin P0.10 allocated to alternate function 2&lt;BR /&gt; LPC_PINCON-&amp;gt;PINSEL0 |= 0x3&amp;lt;&amp;lt;2; //Pin P0.11 allocated to alternate function 2&lt;BR /&gt; LPC_GPIO0-&amp;gt;FIODIR |= (1&amp;lt;&amp;lt;0); //Bit P0.10 an output&lt;BR /&gt; LPC_GPIO0-&amp;gt;FIODIR |= (1&amp;lt;&amp;lt;1); //Bit P0.11 an output&lt;BR /&gt; LPC_PINCON-&amp;gt;PINMODE0 &amp;amp;= ~(3&amp;lt;&amp;lt;0); //P0.10 has pull up/down resistor&lt;BR /&gt; //LPC_PINCON-&amp;gt;PINMODE0 |= (2&amp;lt;&amp;lt;0); //omit to use internal pull up&lt;BR /&gt; LPC_PINCON-&amp;gt;PINMODE0 &amp;amp;= ~(3&amp;lt;&amp;lt;2); //P0.11 has pull up/down resistor&lt;BR /&gt; //LPC_PINCON-&amp;gt;PINMODE0 |= (2&amp;lt;&amp;lt;2); //omit to use internal pull up&lt;BR /&gt; LPC_PINCON-&amp;gt;PINMODE_OD0 |= (1&amp;lt;&amp;lt;0); //Bit P0.10 is open drain&lt;BR /&gt; LPC_PINCON-&amp;gt;PINMODE_OD0 |= (1&amp;lt;&amp;lt;1); //Bit P0.11 is open drain&lt;BR /&gt; LPC_I2C1-&amp;gt;I2SCLH = 60; //100kHz from 12MHz&lt;BR /&gt; LPC_I2C1-&amp;gt;I2SCLL = 60; //100kHz from 12MHz&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;}&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 May 2020 03:01:27 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/I2C-with-MCP23008-in-LPC1752/m-p/1073052#M41397</guid>
      <dc:creator>jahid_sawikot</dc:creator>
      <dc:date>2020-05-26T03:01:27Z</dc:date>
    </item>
    <item>
      <title>Re: I2C with MCP23008 in LPC1752</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/I2C-with-MCP23008-in-LPC1752/m-p/1073053#M41398</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jahid,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I still recommend&amp;nbsp; you to use an external pull-up resistor to guarantee proper signaling on the I2C line.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Looking at your code I have noticed that you enabled the Open Drain Mode&amp;nbsp; and pull up resistors&amp;nbsp; for P0,0 and P0.1&amp;nbsp; (SCL1 and SDA1)&amp;nbsp; When OD is set an external pull up is recommended, because the MCU internal pull up resistors are generally weak (at least 50K ohms).&lt;/P&gt;&lt;P&gt;Regards, Diego.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 May 2020 21:38:30 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/I2C-with-MCP23008-in-LPC1752/m-p/1073053#M41398</guid>
      <dc:creator>diego_charles</dc:creator>
      <dc:date>2020-05-27T21:38:30Z</dc:date>
    </item>
  </channel>
</rss>

