<?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中的主题 Re: Why does I2C Expander send NAK when master writes a byte?</title>
    <link>https://community.nxp.com/t5/LPC-Microcontrollers/Why-does-I2C-Expander-send-NAK-when-master-writes-a-byte/m-p/960683#M38092</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Problem Solved:&lt;/P&gt;&lt;P&gt;First new board:&amp;nbsp; saw NAK in software&lt;/P&gt;&lt;P&gt;Second new board:&amp;nbsp; SCL and SDA no wiggling at all&lt;/P&gt;&lt;P&gt;Third and Fourth Board:&amp;nbsp; I2C communication working as expected&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 13 Sep 2019 12:44:37 GMT</pubDate>
    <dc:creator>anaseem</dc:creator>
    <dc:date>2019-09-13T12:44:37Z</dc:date>
    <item>
      <title>Why does I2C Expander send NAK when master writes a byte?</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Why-does-I2C-Expander-send-NAK-when-master-writes-a-byte/m-p/960679#M38088</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;NXP LPC11E68JBD48E Microcontroller I2C1 is Master. I2C1 is in chapter 13.&amp;nbsp; I2C1 is in Master Transmitter Mode.&lt;BR /&gt;&lt;A href="http://www.mouser.com/ds/2/302/UM10732-315822.pdf"&gt;http://www.mouser.com/ds/2/302/UM10732-315822.pdf&lt;/A&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;NXP PCAL6416A I2C 16-bit I/O Expander is Slave.&amp;nbsp; &lt;A href="https://www.nxp.com/docs/en/data-sheet/PCAL6416A.pdf" target="test_blank"&gt;https://www.nxp.com/docs/en/data-sheet/PCAL6416A.pdf&lt;/A&gt;&lt;/DIV&gt;&lt;DIV&gt;I2C1 Block in Microcontroller is initialized successfully.&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;Step 1.&amp;nbsp; I2C1 block is in master transmitter mode because I2C control Register STA bit is set to 1.&amp;nbsp; See attached step1_Master_Transmitter_Mode.png file.&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;Step 2.&amp;nbsp; Microcontroller I2C1 block transmits START bit.&amp;nbsp; After the START bit is transmitted, the Serial Interrupt(SI) bit in I2C Control Register is set and STAT register in microcontroller I2C1 block contains status of 0x08.&amp;nbsp; See attached filename step2_start_bit_sent.png&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;step 3.&amp;nbsp; The status 0x08 is used to vector to a state service routine.&amp;nbsp; This routine loads the slave address and Write bit to the DAT register.&amp;nbsp; See attached filename step3_status_0x08_state_handler.png&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;step 4.&amp;nbsp; Slave address and Write bit has been transmitted and negative acknowledgement(NAK) is received from slave.&amp;nbsp; The STAT register has status of 0x20 and microcontroller fires interrupt on this status value.&amp;nbsp; See attached step4a_NAK_from_slave.png file and step4b_NAK_handler.png&lt;/DIV&gt;&lt;DIV&gt;&lt;BR /&gt;This problem occurs the very first time Master tries to communicate with slave.&lt;/DIV&gt;&lt;DIV&gt;The previous hardware works fine with this microcontroller and NXP PCA6408AHKX I2C 8-bit Expander chip.&amp;nbsp; When this byte is written to I2C register, ACK is received.&lt;/DIV&gt;&lt;DIV&gt;New hardware is same as previous hardware except 16-bit I/O expander instead of 8-bit.&lt;/DIV&gt;&lt;DIV&gt;What might be the problem?&amp;nbsp; Is it hardware or software?&amp;nbsp; What are usually reasons for NAK in I2C communication?&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 Sep 2019 14:34:37 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Why-does-I2C-Expander-send-NAK-when-master-writes-a-byte/m-p/960679#M38088</guid>
      <dc:creator>anaseem</dc:creator>
      <dc:date>2019-09-06T14:34:37Z</dc:date>
    </item>
    <item>
      <title>Re: Why does I2C Expander send NAK when master writes a byte?</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Why-does-I2C-Expander-send-NAK-when-master-writes-a-byte/m-p/960680#M38089</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The byte I'm sending is 0x42. Seven most significant bits are slave address and least significant bit is write direction bit. Please see attached filename byte_sent.png&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="byte_sent.PNG"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/83691i41ECBB247CED2394/image-size/large?v=v2&amp;amp;px=999" role="button" title="byte_sent.PNG" alt="byte_sent.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 Sep 2019 16:39:48 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Why-does-I2C-Expander-send-NAK-when-master-writes-a-byte/m-p/960680#M38089</guid>
      <dc:creator>anaseem</dc:creator>
      <dc:date>2019-09-06T16:39:48Z</dc:date>
    </item>
    <item>
      <title>Re: Why does I2C Expander send NAK when master writes a byte?</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Why-does-I2C-Expander-send-NAK-when-master-writes-a-byte/m-p/960681#M38090</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;Attached are scope screenshots for existing hardware and new hardware.&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;With existing hardware, slave sends an ACK.&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;With new hardware, after START condition is transmitted, master fires an interrupt to inform software that START bit has been transmitted but I don't see it on SDA line.&amp;nbsp; I'm triggering on START bit.&amp;nbsp; What might be the problem?&lt;BR /&gt;Some inputs in the I2C expander chip are floating.&amp;nbsp; Is this preventing the START bit to appear on the SDA line?&lt;BR /&gt;From I2C expander datasheet:&amp;nbsp; "External resistors are required for inputs (on P Port) that may float.&amp;nbsp; Also, internal pull-up or pull-down may be used to eliminate the need for external components."&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="lpc11e68_Master_pca6408_slave_addr_byte.PNG"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/81915i2AE7BBAF9C4B59F2/image-size/large?v=v2&amp;amp;px=999" role="button" title="lpc11e68_Master_pca6408_slave_addr_byte.PNG" alt="lpc11e68_Master_pca6408_slave_addr_byte.PNG" /&gt;&lt;/span&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="lpc11e68_Master_pcal6416_slave_no_start_bit.PNG"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/82005i841591E015B91959/image-size/large?v=v2&amp;amp;px=999" role="button" title="lpc11e68_Master_pcal6416_slave_no_start_bit.PNG" alt="lpc11e68_Master_pcal6416_slave_no_start_bit.PNG" /&gt;&lt;/span&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Sep 2019 20:20:58 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Why-does-I2C-Expander-send-NAK-when-master-writes-a-byte/m-p/960681#M38090</guid>
      <dc:creator>anaseem</dc:creator>
      <dc:date>2019-09-10T20:20:58Z</dc:date>
    </item>
    <item>
      <title>Re: Why does I2C Expander send NAK when master writes a byte?</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Why-does-I2C-Expander-send-NAK-when-master-writes-a-byte/m-p/960682#M38091</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Amer,&lt;/P&gt;&lt;P&gt;Please check the datasheet of I2C Expander, whether send the right data to it.&lt;/P&gt;&lt;P&gt;Also you can attach your project, we will help to check the code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BR&lt;/P&gt;&lt;P&gt;Alice&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Sep 2019 03:04:58 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Why-does-I2C-Expander-send-NAK-when-master-writes-a-byte/m-p/960682#M38091</guid>
      <dc:creator>Alice_Yang</dc:creator>
      <dc:date>2019-09-12T03:04:58Z</dc:date>
    </item>
    <item>
      <title>Re: Why does I2C Expander send NAK when master writes a byte?</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Why-does-I2C-Expander-send-NAK-when-master-writes-a-byte/m-p/960683#M38092</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Problem Solved:&lt;/P&gt;&lt;P&gt;First new board:&amp;nbsp; saw NAK in software&lt;/P&gt;&lt;P&gt;Second new board:&amp;nbsp; SCL and SDA no wiggling at all&lt;/P&gt;&lt;P&gt;Third and Fourth Board:&amp;nbsp; I2C communication working as expected&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Sep 2019 12:44:37 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Why-does-I2C-Expander-send-NAK-when-master-writes-a-byte/m-p/960683#M38092</guid>
      <dc:creator>anaseem</dc:creator>
      <dc:date>2019-09-13T12:44:37Z</dc:date>
    </item>
  </channel>
</rss>

