<?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>Kinetis MicrocontrollersのトピックRe: PCA9698 i2c sample code</title>
    <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/PCA9698-i2c-sample-code/m-p/1296321#M60909</link>
    <description>&lt;P&gt;Will you be able to review my Keil code attached here which is simple code of writing "0" and "1" to pin 0, bank 0 (configured as output)?&lt;/P&gt;&lt;P&gt;When I debug my code, it gets stuck at line 221 of code&amp;nbsp;inside function "I2C_WriteAccelReg". If I use&amp;nbsp;function "I2C_MasterTransfer&lt;STRONG&gt;Blocking&lt;/STRONG&gt;" ( inside function "I2C_WriteAccelReg"), the code get stuck at line 952 of driver&amp;nbsp;"fsl_i2c.c"&lt;/P&gt;</description>
    <pubDate>Tue, 22 Jun 2021 18:10:04 GMT</pubDate>
    <dc:creator>hfabbasi</dc:creator>
    <dc:date>2021-06-22T18:10:04Z</dc:date>
    <item>
      <title>PCA9698 i2c sample code</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/PCA9698-i2c-sample-code/m-p/1294240#M60869</link>
      <description>&lt;P&gt;Would anybody be so kind to send me the sample code for nxp K60DX256VLL10 to communicate with PCA9698 over I2C protocol to turn led on/off for bank 0?&lt;/P&gt;</description>
      <pubDate>Thu, 17 Jun 2021 17:07:10 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/PCA9698-i2c-sample-code/m-p/1294240#M60869</guid>
      <dc:creator>hfabbasi</dc:creator>
      <dc:date>2021-06-17T17:07:10Z</dc:date>
    </item>
    <item>
      <title>Re: PCA9698 i2c sample code</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/PCA9698-i2c-sample-code/m-p/1294357#M60870</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;Which mcu do you use? We do not have the sample code about PCA9698. You may refer this code. It uses i2c to driver the w25q. You can use these code to try to communicate with the PCA9698.&lt;/P&gt;
&lt;P&gt;Have a great day,&lt;BR /&gt;TIC&lt;/P&gt;
&lt;P&gt;-------------------------------------------------------------------------------&lt;BR /&gt;Note:&lt;BR /&gt;- If this post answers your question, please click the "Mark Correct" button. Thank you!&lt;/P&gt;
&lt;P&gt;- We are following threads for 7 days after the last post, later replies are ignored&lt;BR /&gt;Please open a new thread and refer to the closed one, if you have a related question at a later point in time.&lt;BR /&gt;-------------------------------------------------------------------------------&lt;/P&gt;</description>
      <pubDate>Fri, 18 Jun 2021 02:16:22 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/PCA9698-i2c-sample-code/m-p/1294357#M60870</guid>
      <dc:creator>nxf56274</dc:creator>
      <dc:date>2021-06-18T02:16:22Z</dc:date>
    </item>
    <item>
      <title>Re: PCA9698 i2c sample code</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/PCA9698-i2c-sample-code/m-p/1295562#M60891</link>
      <description>&lt;P&gt;This is an example of SPI and not of I2C. Would you be so kind to share the code for I2C or atleast guide how to configure PCA9698 for turning LED on/off connected to bank 0, pin 0? What would be the sequence of device (slave) address, output configuration register and command register for output?&lt;/P&gt;</description>
      <pubDate>Mon, 21 Jun 2021 17:02:40 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/PCA9698-i2c-sample-code/m-p/1295562#M60891</guid>
      <dc:creator>hfabbasi</dc:creator>
      <dc:date>2021-06-21T17:02:40Z</dc:date>
    </item>
    <item>
      <title>Re: PCA9698 i2c sample code</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/PCA9698-i2c-sample-code/m-p/1295627#M60893</link>
      <description>&lt;P&gt;Hi&lt;BR /&gt;&lt;BR /&gt;Assuming that the PCA9698 is connected with AD0, AD1 and AD2 at GND its write address is 0x40 and its read address is 0x41.&lt;BR /&gt;&lt;BR /&gt;To configure the first output (only) the transmission sequence is&lt;BR /&gt;0x40 0x18 0xfe&lt;BR /&gt;which will change it from its default input to output and it will drive '0'&lt;BR /&gt;&lt;BR /&gt;To change it to '1' the transmission sequence is&lt;BR /&gt;0x40 0x08 0x01&lt;BR /&gt;&lt;BR /&gt;To change it back to '0' the transmission sequence is&lt;BR /&gt;0x40 0x08 0x00&lt;BR /&gt;&lt;BR /&gt;uTasker I2C interface code to do it (on I2C0 at 100kb/s) is:&lt;BR /&gt;&lt;BR /&gt;&lt;EM&gt;&lt;STRONG&gt;define I2C_WRITE_ADDRESS&amp;nbsp; &amp;nbsp;0x40&lt;/STRONG&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&lt;STRONG&gt;define I2C_READ_ADDRESS&amp;nbsp; &amp;nbsp; 0x41&lt;/STRONG&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;EM&gt;&lt;STRONG&gt;&amp;nbsp; &amp;nbsp; static QUEUE_HANDLE I2CPortID = NO_ID_ALLOCATED;&lt;/STRONG&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;EM&gt;&lt;STRONG&gt;&amp;nbsp; &amp;nbsp; static const unsigned char ucConfigureOutput[] = {I2C_WRITE_ADDRESS, 0x18, 0xfe};&lt;/STRONG&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&lt;STRONG&gt;&amp;nbsp; &amp;nbsp; static const unsigned char ucSetOutputHigh[] = {I2C_WRITE_ADDRESS, 0x08, 0x01};&lt;/STRONG&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&lt;STRONG&gt;&amp;nbsp; &amp;nbsp; static const unsigned char ucSetOutputLow[] = {I2C_WRITE_ADDRESS, 0x08, 0x00};&lt;/STRONG&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;EM&gt;&lt;STRONG&gt;&amp;nbsp; &amp;nbsp; I2CTABLE tI2CParameters;&lt;/STRONG&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;EM&gt;&lt;STRONG&gt;&amp;nbsp; &amp;nbsp; tI2CParameters.Channel = 0;&lt;/STRONG&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&lt;STRONG&gt;&amp;nbsp; &amp;nbsp; tI2CParameters.usSpeed = 100;&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; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // 100k&lt;/STRONG&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&lt;STRONG&gt;&amp;nbsp; &amp;nbsp; tI2CParameters.Rx_tx_sizes.TxQueueSize = 64;&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;// transmit queue size&lt;/STRONG&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&lt;STRONG&gt;&amp;nbsp; &amp;nbsp; tI2CParameters.Rx_tx_sizes.RxQueueSize = 64;&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;// receive queue size&lt;/STRONG&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&lt;STRONG&gt;&amp;nbsp; &amp;nbsp; tI2CParameters.Task_to_wake = 0;&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; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;// no wake on transmission termination&lt;/STRONG&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&lt;STRONG&gt;&amp;nbsp; &amp;nbsp; I2CPortID = fnOpen(TYPE_I2C, FOR_I_O, &amp;amp;tI2CParameters);&lt;/STRONG&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&lt;STRONG&gt;&amp;nbsp; &amp;nbsp; fnWrite(I2CPortID, (unsigned char *)ucConfigureOutput, sizeof(ucConfigureOutput));&lt;/STRONG&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&lt;STRONG&gt;&amp;nbsp; &amp;nbsp; fnWrite(I2CPortID, (unsigned char *)ucSetOutputHigh, sizeof(ucSetOutputHigh));&lt;/STRONG&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&lt;STRONG&gt;&amp;nbsp; &amp;nbsp; fnWrite(I2CPortID, (unsigned char *)ucSetOutputLow, sizeof(ucSetOutputLow));&lt;/STRONG&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Mark&lt;BR /&gt;&lt;EM&gt;[uTasker project developer for Kinetis and i.MX RT]&lt;/EM&gt;&lt;BR /&gt;&lt;FONT color="#999999"&gt;Contact me by personal message or on the uTasker web site to discuss professional training, solutions to problems or rapid product development requirements&lt;BR /&gt;&lt;BR /&gt;For professionals searching for faster, problem-free Kinetis and i.MX RT 10xx developments the uTasker project holds the key: &lt;A href="https://www.utasker.com/iMX/RT1064.html" target="_blank" rel="noopener"&gt;https://www.utasker.com/iMX/RT1064.html&lt;/A&gt;&lt;BR /&gt;&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 21 Jun 2021 19:52:53 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/PCA9698-i2c-sample-code/m-p/1295627#M60893</guid>
      <dc:creator>mjbcswitzerland</dc:creator>
      <dc:date>2021-06-21T19:52:53Z</dc:date>
    </item>
    <item>
      <title>Re: PCA9698 i2c sample code</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/PCA9698-i2c-sample-code/m-p/1296321#M60909</link>
      <description>&lt;P&gt;Will you be able to review my Keil code attached here which is simple code of writing "0" and "1" to pin 0, bank 0 (configured as output)?&lt;/P&gt;&lt;P&gt;When I debug my code, it gets stuck at line 221 of code&amp;nbsp;inside function "I2C_WriteAccelReg". If I use&amp;nbsp;function "I2C_MasterTransfer&lt;STRONG&gt;Blocking&lt;/STRONG&gt;" ( inside function "I2C_WriteAccelReg"), the code get stuck at line 952 of driver&amp;nbsp;"fsl_i2c.c"&lt;/P&gt;</description>
      <pubDate>Tue, 22 Jun 2021 18:10:04 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/PCA9698-i2c-sample-code/m-p/1296321#M60909</guid>
      <dc:creator>hfabbasi</dc:creator>
      <dc:date>2021-06-22T18:10:04Z</dc:date>
    </item>
  </channel>
</rss>

