<?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>topic Re: Start I2C on LPC845 in LPC Microcontrollers</title>
    <link>https://community.nxp.com/t5/LPC-Microcontrollers/Start-I2C-on-LPC845/m-p/1971089#M57002</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/241441"&gt;@Ivan_16&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;There are possible issues to double-check,&lt;/P&gt;
&lt;P&gt;1. Incorrect Clock Configuration: Make sure that your system clock is set up correctly and that the I2C peripheral is receiving the correct clock source.&lt;BR /&gt;2. Missing Pull-up Resistors: Check that you have external pull-up resistors on both the SDA and SCL lines, especially since you are using an N-MOS-based level shifter.&lt;BR /&gt;3. Pin Muxing: Ensure that the pins are properly configured as I2C pins (PIO0_10 for SDA and PIO0_11 for SCL).&lt;BR /&gt;4. Incorrect Level Shifter: Double-check the connections of your level shifter circuit to make sure that the directionality is correct for both the SDA and SCL lines.&lt;/P&gt;
&lt;P&gt;BR&lt;/P&gt;
&lt;P&gt;Hang&lt;/P&gt;</description>
    <pubDate>Thu, 10 Oct 2024 07:09:44 GMT</pubDate>
    <dc:creator>Harry_Zhang</dc:creator>
    <dc:date>2024-10-10T07:09:44Z</dc:date>
    <item>
      <title>Start I2C on LPC845</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Start-I2C-on-LPC845/m-p/1966594#M56951</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I'm writing a sample code to initialize &lt;STRONG&gt;I2C communication&lt;/STRONG&gt; on my &lt;STRONG&gt;LPC845&lt;/STRONG&gt; and PCF8574 of &lt;STRONG&gt;LCD&lt;/STRONG&gt; HD44780.&lt;/P&gt;&lt;P&gt;At the moment, I would to write simple code with the only scope to see the signals of &lt;STRONG&gt;SDA&lt;/STRONG&gt; and &lt;STRONG&gt;SCL&lt;/STRONG&gt; in oscilloscope and to control that all is initialized correctly.&lt;/P&gt;&lt;P&gt;The I2C of LPC is converted with &lt;STRONG&gt;bi-directional 5V level shifter&lt;/STRONG&gt; (I do this circuit with 2 IRFZ44n, N-MOS) as requested by PCF8574 --&amp;gt; (&lt;EM&gt;attachments&lt;/EM&gt;)&lt;/P&gt;&lt;P&gt;I've initialized all the register that are wrote into the datasheet (as you can see from attachments) but &lt;U&gt;I don't see anything on my oscilloscope screen&lt;/U&gt;.&lt;/P&gt;&lt;P&gt;What It could be the issue?, could you help me please? I would understand which errors are in the code.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Ivan&lt;/P&gt;</description>
      <pubDate>Thu, 03 Oct 2024 20:13:52 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Start-I2C-on-LPC845/m-p/1966594#M56951</guid>
      <dc:creator>Ivan_16</dc:creator>
      <dc:date>2024-10-03T20:13:52Z</dc:date>
    </item>
    <item>
      <title>Re: Start I2C on LPC845</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Start-I2C-on-LPC845/m-p/1966978#M56955</link>
      <description>About the SDA and SCL signals I see all the time only 5v on the Hv side of i2c level converter.&lt;BR /&gt;&lt;BR /&gt;I think the problem is in the GPIO or clock configuration for PIO0_10 and PIO0_11, because these pin are in open-drain mode.</description>
      <pubDate>Fri, 04 Oct 2024 14:35:41 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Start-I2C-on-LPC845/m-p/1966978#M56955</guid>
      <dc:creator>Ivan_16</dc:creator>
      <dc:date>2024-10-04T14:35:41Z</dc:date>
    </item>
    <item>
      <title>Re: Start I2C on LPC845</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Start-I2C-on-LPC845/m-p/1971089#M57002</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/241441"&gt;@Ivan_16&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;There are possible issues to double-check,&lt;/P&gt;
&lt;P&gt;1. Incorrect Clock Configuration: Make sure that your system clock is set up correctly and that the I2C peripheral is receiving the correct clock source.&lt;BR /&gt;2. Missing Pull-up Resistors: Check that you have external pull-up resistors on both the SDA and SCL lines, especially since you are using an N-MOS-based level shifter.&lt;BR /&gt;3. Pin Muxing: Ensure that the pins are properly configured as I2C pins (PIO0_10 for SDA and PIO0_11 for SCL).&lt;BR /&gt;4. Incorrect Level Shifter: Double-check the connections of your level shifter circuit to make sure that the directionality is correct for both the SDA and SCL lines.&lt;/P&gt;
&lt;P&gt;BR&lt;/P&gt;
&lt;P&gt;Hang&lt;/P&gt;</description>
      <pubDate>Thu, 10 Oct 2024 07:09:44 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Start-I2C-on-LPC845/m-p/1971089#M57002</guid>
      <dc:creator>Harry_Zhang</dc:creator>
      <dc:date>2024-10-10T07:09:44Z</dc:date>
    </item>
    <item>
      <title>Re: Start I2C on LPC845</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Start-I2C-on-LPC845/m-p/1971368#M57008</link>
      <description>&lt;P&gt;Hi Hang,&lt;/P&gt;&lt;P&gt;In these days I've tried multiple configurations, as you listed now, the N-MOS level translator and pull-ups connected to &lt;STRONG&gt;PIO0_10&lt;/STRONG&gt; and&amp;nbsp;&lt;STRONG&gt;PIO0_11&lt;/STRONG&gt; are working correctly (the circuit is the same of the attached photos).&lt;/P&gt;&lt;P&gt;I've found that I was wrong to put in the right place the while statements for &lt;STRONG&gt;&lt;EM&gt;PENDING status&lt;/EM&gt;&lt;/STRONG&gt; during the I2C Master transmission.&lt;/P&gt;&lt;P&gt;As linked in the manual guide into&lt;STRONG&gt; I2C0 Chapter&lt;/STRONG&gt;, the third and sixth points &lt;STRONG&gt;&lt;EM&gt;"Wait for the pending status to be set (MSTPENDING = 1) by polling the STAT register"&lt;/EM&gt;&lt;/STRONG&gt; has to be as follow:&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;P&gt;&lt;EM&gt;LPC_I2C0 -&amp;gt; MSTDAT = ADDR;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;MSCTL_REG = I2C_MSTCTL_MSTSTART_ON;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;MSCTL_REG = I2C_MSTCTL_MSTSTART_OFF;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;while(!(LPC_I2C0 -&amp;gt;STAT &amp;amp; (1 &amp;lt;&amp;lt; 0)));&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;LPC_I2C0 -&amp;gt; MSTDAT = DATA;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;while(!(LPC_I2C0 -&amp;gt;STAT &amp;amp; (1 &amp;lt;&amp;lt; 0)));&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;MSCTL_REG = I2C_MSTCTL_MSTSTOP_ON;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;MSCTL_REG = I2C_MSTCTL_MSTSTOP_OFF;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;I've observed also that my "&lt;STRONG&gt;&lt;EM&gt;printf&amp;nbsp;&lt;/EM&gt;&lt;/STRONG&gt;" function (for debugging) gave me issues to the right clock timing of I2C, inside the above transmission cycle code...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Ivan&lt;/P&gt;</description>
      <pubDate>Thu, 10 Oct 2024 12:25:06 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Start-I2C-on-LPC845/m-p/1971368#M57008</guid>
      <dc:creator>Ivan_16</dc:creator>
      <dc:date>2024-10-10T12:25:06Z</dc:date>
    </item>
  </channel>
</rss>

