<?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 FSOX8700 acclerometer on the FRDM-K22F in Kinetis Microcontrollers</title>
    <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/FSOX8700-acclerometer-on-the-FRDM-K22F/m-p/363390#M18586</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Is there an application that uses the FSOX8700 accelerometer on the FRDM-K22F board?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am unable to address the unit on the I2C bus and figure and example or demo would help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 06 Mar 2015 02:53:49 GMT</pubDate>
    <dc:creator>davepfaltzgraff</dc:creator>
    <dc:date>2015-03-06T02:53:49Z</dc:date>
    <item>
      <title>FSOX8700 acclerometer on the FRDM-K22F</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/FSOX8700-acclerometer-on-the-FRDM-K22F/m-p/363390#M18586</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Is there an application that uses the FSOX8700 accelerometer on the FRDM-K22F board?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am unable to address the unit on the I2C bus and figure and example or demo would help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 Mar 2015 02:53:49 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/FSOX8700-acclerometer-on-the-FRDM-K22F/m-p/363390#M18586</guid>
      <dc:creator>davepfaltzgraff</dc:creator>
      <dc:date>2015-03-06T02:53:49Z</dc:date>
    </item>
    <item>
      <title>Re: FSOX8700 acclerometer on the FRDM-K22F</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/FSOX8700-acclerometer-on-the-FRDM-K22F/m-p/363391#M18587</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi David&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The accelerometer is used in this &lt;A href="http://www.utasker.com/kinetis/FRDM-K22F.html" rel="nofollow noopener noreferrer" title="http://www.utasker.com/kinetis/FRDM-K22F.html" target="_blank"&gt;http://www.utasker.com/kinetis/FRDM-K22F.html&lt;/A&gt; (values are displayed or can control a USB mouse).&lt;/P&gt;&lt;P&gt;Beware that the accelerometer has a number of possible I2C addresses that can be configured by pull-up/downs on the board. Specifically you need 0x39 to read it and 0x38 to write it on the FRDM-K22F (where the R/W bit is included in the address - or 0x1c if not). It is only used in MMA8451 compatible mode though but can be set to 14 or 8 bit resolution and use either continuous I2C reading or based on interrupt conversion completion.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have added a few snippets below&amp;nbsp; that may help (register values will be fairly clear from the data sheet).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The framework at the link will allows the K22, its I2C operation and the accelerometer to be simulated which makes project development and testing easier.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note also that the accelerometers don't have a reset line so resetting the processor during transfers can cause the I2C bus to lock up, requiring a power cycle to recover. The I2C driver in the framework incorporates dead-lock detection and recovery.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Mark&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kinetis: &lt;A href="http://www.utasker.com/kinetis.html" rel="nofollow noopener noreferrer" title="http://www.utasker.com/kinetis.html" target="_blank"&gt;µTasker Kinetis support&lt;/A&gt; &lt;/P&gt;&lt;P&gt;K22: &lt;A href="http://www.utasker.com/kinetis/FRDM-K22F.html" rel="nofollow noopener noreferrer" title="http://www.utasker.com/kinetis/FRDM-K22F.html" target="_blank"&gt;µTasker Kinetis FRDM-K22F support&lt;/A&gt; / &lt;A href="http://www.utasker.com/kinetis/TWR-K22F120M.html" rel="nofollow noopener noreferrer" title="http://www.utasker.com/kinetis/TWR-K22F120M.html" target="_blank"&gt;µTasker Kinetis TWR-K22F120M support&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;For the complete "out-of-the-box" Kinetis experience and faster time to market&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="c++" __jive_macro_name="code" class="jive_text_macro jive_macro_code _jivemacro_uid_142561305979728" jivemacro_uid="_142561305979728"&gt;
&lt;P&gt;static const unsigned char ucSetAccelerometerAddress[] = {FXOS8700_WRITE_ADDRESS, ACC_START_ADDRESS}; // command to set address to read to the start address&lt;/P&gt;
&lt;P&gt;static const unsigned char ucReadAccelerometerRegisters[] = {ACC_READ_LENGTH, FXOS8700_READ_ADDRESS, OWN_TASK}; // command to start a read the defined amount of bytes with the task scheduled when the read has completed&lt;/P&gt;
&lt;P&gt;static const unsigned char ucSetAccelerometerMode[] = {FXOS8700_WRITE_ADDRESS, ACC_CONTROL_REGISTER, (ACC_CONTROL_REGISTER_ACTIVE | ACC_CONTROL_REGISTER_DATA_RATE_6_25Hz | ACC_CONTROL_REGISTER_SLEEP_RATE_6_25Hz | ACC_CONTROL_REGISTER_LNOISE | ACC_CONTROL_REGISTER_F_READ)}; // command to set the mode&lt;/P&gt;
&lt;P&gt;static const unsigned char ucSetAccelerometerRead[] = {FXOS8700_WRITE_ADDRESS, 0}; // command to set address to read to the first register address (status)&lt;/P&gt;
&lt;P&gt;static const unsigned char ucReadAccelerometerState[] = {4, FXOS8700_READ_ADDRESS, OWN_TASK}; // command to start a read the defined amount of bytes with the task scheduled when the read has completed&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;fnWrite(IICPortID, (unsigned char *)ucSetAccelerometerAddress, sizeof(ucSetAccelerometerAddress)); // write the register address to read from&lt;/P&gt;
&lt;P&gt;fnRead(IICPortID, (unsigned char *)ucReadAccelerometerRegisters, 0); // start the read process of the required amount of bytes (check the status before beginning)&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;fnWrite(IICPortID, (unsigned char *)ucSetAccelerometerMode, sizeof(ucSetAccelerometerMode)); // write the operating mode&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;// Followed by the first status read&lt;/P&gt;
&lt;P&gt;//&lt;/P&gt;
&lt;P&gt;fnWrite(IICPortID, (unsigned char *)ucSetAccelerometerRead, sizeof(ucSetAccelerometerRead)); // write the register address to read&lt;/P&gt;
&lt;P&gt;fnRead(IICPortID, (unsigned char *)ucReadAccelerometerState, 0); // start the read process of the status&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;// and repeat, or wait for interrupt &lt;/P&gt;
&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 Mar 2015 03:40:12 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/FSOX8700-acclerometer-on-the-FRDM-K22F/m-p/363391#M18587</guid>
      <dc:creator>mjbcswitzerland</dc:creator>
      <dc:date>2015-03-06T03:40:12Z</dc:date>
    </item>
    <item>
      <title>Re: FSOX8700 acclerometer on the FRDM-K22F</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/FSOX8700-acclerometer-on-the-FRDM-K22F/m-p/363392#M18588</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;After trying the code from uTasker and observing the signal levels on an oscilloscope, I determined that the Kinetis ports were not set to open collector. I went back to PE and according to the screen, everything was A-OK. However, affter manually enabling the Open Collector selection for the two port bits, the hardware started responding.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note: There seems to be some problem in getting PE to synchronize what's displayed and what's generated. It would help if &amp;lt;Auto&amp;gt; was displayed rather than &amp;lt;Enabled&amp;gt; or &amp;lt;Disabled&amp;gt;. &amp;lt;Auto&amp;gt; is not a choice.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Mar 2015 00:45:01 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/FSOX8700-acclerometer-on-the-FRDM-K22F/m-p/363392#M18588</guid>
      <dc:creator>davepfaltzgraff</dc:creator>
      <dc:date>2015-03-10T00:45:01Z</dc:date>
    </item>
  </channel>
</rss>

