<?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 I2C not working between LPC824 and MMA8453Q? in LPC Microcontrollers</title>
    <link>https://community.nxp.com/t5/LPC-Microcontrollers/I2C-not-working-between-LPC824-and-MMA8453Q/m-p/926905#M36969</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="color: #242729; background-color: #ffffff; border: 0px; margin: 0px 0px 1em;"&gt;For a project I am using an LPC824 MCU from NXP and I want to read out data from the accelerometer over I2C. This accelerometer is the MMA8453Q. Looking into the datasheet of the accelerometer I see the following:&lt;/P&gt;&lt;P style="color: #242729; background-color: #ffffff; border: 0px; margin: 0px 0px 1em;"&gt;&lt;SPAN class="lia-inline-image-display-wrapper" image-alt="Annotation 2019-10-16 082741.png"&gt;&lt;IMG alt="Annotation 2019-10-16 082741.png" src="https://community.nxp.com/t5/image/serverpage/image-id/91563iAAAB49D75C0DE0BF/image-size/large?v=v2&amp;amp;px=999" title="Annotation 2019-10-16 082741.png" /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #242729; background-color: #ffffff; border: 0px; margin: 0px 0px 1em;"&gt;From my understanding this means that you give a start signal, you write the device address and put write behind it, you get an acknowledgement and so on.&lt;/P&gt;&lt;P style="color: #242729; background-color: #ffffff; border: 0px; margin: 0px 0px 1em;"&gt;The address I have to write is the following:&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #242729; background-color: #ffffff; border: 0px; margin: 0px 0px 1em;"&gt;&lt;SPAN&gt;&lt;SPAN class="lia-inline-image-display-wrapper" image-alt="Annotation 2019-10-16 083059.png"&gt;&lt;IMG alt="Annotation 2019-10-16 083059.png" src="https://community.nxp.com/t5/image/serverpage/image-id/91521iED6068677F41A1FE/image-size/large?v=v2&amp;amp;px=999" title="Annotation 2019-10-16 083059.png" /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #242729; background-color: #ffffff; border: 0px; margin: 0px 0px 1em;"&gt;the register I chose for now was 0x0D which is the "Who am I" register, this should always be read as 0x3A.&lt;/P&gt;&lt;P style="color: #242729; background-color: #ffffff; border: 0px; margin: 0px 0px 1em;"&gt;For people familiar with NXP examples I based myself on one of them. This is the code I have atm:&lt;/P&gt;&lt;PRE style="color: #242729; background-color: #eff0f1; border: 0px; margin: 0px 0px 1em; padding: 12px 8px;"&gt;&lt;CODE style="background-color: #eff0f1; border: 0px; font-weight: inherit;"&gt;*txData = 0x0D; SetupXferRecAndExecute(0x1C, txData, 1, rxData, 0); SetupXferRecAndExecute(0x1C, txData, 0, rxData, 1);&lt;/CODE&gt;&lt;/PRE&gt;&lt;P style="color: #242729; background-color: #ffffff; border: 0px; margin: 0px 0px 1em;"&gt;and this is what it looks like on the scope&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #242729; background-color: #ffffff; border: 0px; margin: 0px 0px 1em;"&gt;&lt;SPAN&gt;&lt;SPAN class="lia-inline-image-display-wrapper" image-alt="73504874_455677998383164_942080091167391744_n.jpg"&gt;&lt;IMG alt="73504874_455677998383164_942080091167391744_n.jpg" src="https://community.nxp.com/t5/image/serverpage/image-id/91479iC62EC160AD9E7214/image-size/large?v=v2&amp;amp;px=999" title="73504874_455677998383164_942080091167391744_n.jpg" /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #242729; background-color: #ffffff; border: 0px; margin: 0px 0px 1em;"&gt;So as i can see I send the Device adress twice, first I write the register address and than i want to read it, but it gives 0x00 back. Can someone pls help me? Thanks in advance!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 02 Nov 2020 14:24:23 GMT</pubDate>
    <dc:creator>joren_joly</dc:creator>
    <dc:date>2020-11-02T14:24:23Z</dc:date>
    <item>
      <title>I2C not working between LPC824 and MMA8453Q?</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/I2C-not-working-between-LPC824-and-MMA8453Q/m-p/926905#M36969</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="color: #242729; background-color: #ffffff; border: 0px; margin: 0px 0px 1em;"&gt;For a project I am using an LPC824 MCU from NXP and I want to read out data from the accelerometer over I2C. This accelerometer is the MMA8453Q. Looking into the datasheet of the accelerometer I see the following:&lt;/P&gt;&lt;P style="color: #242729; background-color: #ffffff; border: 0px; margin: 0px 0px 1em;"&gt;&lt;SPAN class="lia-inline-image-display-wrapper" image-alt="Annotation 2019-10-16 082741.png"&gt;&lt;IMG alt="Annotation 2019-10-16 082741.png" src="https://community.nxp.com/t5/image/serverpage/image-id/91563iAAAB49D75C0DE0BF/image-size/large?v=v2&amp;amp;px=999" title="Annotation 2019-10-16 082741.png" /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #242729; background-color: #ffffff; border: 0px; margin: 0px 0px 1em;"&gt;From my understanding this means that you give a start signal, you write the device address and put write behind it, you get an acknowledgement and so on.&lt;/P&gt;&lt;P style="color: #242729; background-color: #ffffff; border: 0px; margin: 0px 0px 1em;"&gt;The address I have to write is the following:&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #242729; background-color: #ffffff; border: 0px; margin: 0px 0px 1em;"&gt;&lt;SPAN&gt;&lt;SPAN class="lia-inline-image-display-wrapper" image-alt="Annotation 2019-10-16 083059.png"&gt;&lt;IMG alt="Annotation 2019-10-16 083059.png" src="https://community.nxp.com/t5/image/serverpage/image-id/91521iED6068677F41A1FE/image-size/large?v=v2&amp;amp;px=999" title="Annotation 2019-10-16 083059.png" /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #242729; background-color: #ffffff; border: 0px; margin: 0px 0px 1em;"&gt;the register I chose for now was 0x0D which is the "Who am I" register, this should always be read as 0x3A.&lt;/P&gt;&lt;P style="color: #242729; background-color: #ffffff; border: 0px; margin: 0px 0px 1em;"&gt;For people familiar with NXP examples I based myself on one of them. This is the code I have atm:&lt;/P&gt;&lt;PRE style="color: #242729; background-color: #eff0f1; border: 0px; margin: 0px 0px 1em; padding: 12px 8px;"&gt;&lt;CODE style="background-color: #eff0f1; border: 0px; font-weight: inherit;"&gt;*txData = 0x0D; SetupXferRecAndExecute(0x1C, txData, 1, rxData, 0); SetupXferRecAndExecute(0x1C, txData, 0, rxData, 1);&lt;/CODE&gt;&lt;/PRE&gt;&lt;P style="color: #242729; background-color: #ffffff; border: 0px; margin: 0px 0px 1em;"&gt;and this is what it looks like on the scope&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #242729; background-color: #ffffff; border: 0px; margin: 0px 0px 1em;"&gt;&lt;SPAN&gt;&lt;SPAN class="lia-inline-image-display-wrapper" image-alt="73504874_455677998383164_942080091167391744_n.jpg"&gt;&lt;IMG alt="73504874_455677998383164_942080091167391744_n.jpg" src="https://community.nxp.com/t5/image/serverpage/image-id/91479iC62EC160AD9E7214/image-size/large?v=v2&amp;amp;px=999" title="73504874_455677998383164_942080091167391744_n.jpg" /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #242729; background-color: #ffffff; border: 0px; margin: 0px 0px 1em;"&gt;So as i can see I send the Device adress twice, first I write the register address and than i want to read it, but it gives 0x00 back. Can someone pls help me? Thanks in advance!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Nov 2020 14:24:23 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/I2C-not-working-between-LPC824-and-MMA8453Q/m-p/926905#M36969</guid>
      <dc:creator>joren_joly</dc:creator>
      <dc:date>2020-11-02T14:24:23Z</dc:date>
    </item>
    <item>
      <title>Re: I2C not working between LPC824 and MMA8453Q?</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/I2C-not-working-between-LPC824-and-MMA8453Q/m-p/926906#M36970</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Joren,&lt;/P&gt;&lt;P&gt;I went ahead to check the datasheet for the accelerometer you are using. I'd like to check first some hardware considerations, to rule out any issue there.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can you please confirm the following:&lt;/P&gt;&lt;P&gt;1. If you are using 0x1C as your device address, that pin 7 is pulled to ground.&lt;/P&gt;&lt;P&gt;2. VDDIO is pulled high&lt;/P&gt;&lt;P&gt;3. SDA and SCL have pull up resistors.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If the above is correct, then we can confirm that the sequence is correct. Can you please clarify what your function&amp;nbsp;&lt;STRONG&gt;SetupXferRecAndExecute(0x1C, txData, 1, rxData, 0); &lt;/STRONG&gt;is doing? I am not exactly following this and was not able to find a similar function in the SDK for the LPC824.&lt;/P&gt;&lt;P&gt;Essentially we need to make sure here that you send the following sequence:&lt;/P&gt;&lt;P&gt;1. Start Condition&lt;/P&gt;&lt;P&gt;2. 0x1C&lt;/P&gt;&lt;P&gt;3.Write(Bit is 0)&lt;/P&gt;&lt;P&gt;4. &lt;STRONG&gt;Receives ACK&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;5. 0x0D (Who Am I)&lt;/P&gt;&lt;P&gt;6. &lt;STRONG&gt;Receives ACK&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;7.Start Repeated Condition&lt;/P&gt;&lt;P&gt;8. Read(Bit is 1)&lt;/P&gt;&lt;P&gt;9.&lt;STRONG&gt;Receives ACK&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;10.&lt;STRONG&gt;Receives Data&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;11. NAK&lt;/P&gt;&lt;P&gt;12. Stop Condition&lt;/P&gt;&lt;P&gt;I'm seeing that the blue line looks like the SDA is this correct? If so in order to be sure that the above is being sent through properly, you need to mesure the data fram showing so we can confirm if the information is being sent properly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also if you can please confirm the mcuxpresso version you re using as well as the SDK so I can check the examples provided.&lt;/P&gt;&lt;P&gt;Best Regards,&lt;/P&gt;&lt;P&gt;Sabina&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 Oct 2019 01:11:28 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/I2C-not-working-between-LPC824-and-MMA8453Q/m-p/926906#M36970</guid>
      <dc:creator>Sabina_Bruce</dc:creator>
      <dc:date>2019-10-17T01:11:28Z</dc:date>
    </item>
  </channel>
</rss>

