<?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>Wireless MCU中的主题 Re: JN-AN-1220 having trouble setting output to off.</title>
    <link>https://community.nxp.com/t5/Wireless-MCU/JN-AN-1220-having-trouble-setting-output-to-off/m-p/740572#M4144</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Well, I had figure it out after I turn off SPI and DIO19 is working fine as digital output.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I read more on the SPI and seems that DIO19 is SPISEL0 also.&amp;nbsp; When using SPI, SPISEL0 is always used and can't be reassigned unlike SPISEL1/2 that can be assigned to different pins.&amp;nbsp; So what I end up doing was to move the digital output to a different pin.&amp;nbsp; Hope this will help other people in their designs.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 15 Dec 2017 15:05:51 GMT</pubDate>
    <dc:creator>lse</dc:creator>
    <dc:date>2017-12-15T15:05:51Z</dc:date>
    <item>
      <title>JN-AN-1220 having trouble setting output to off.</title>
      <link>https://community.nxp.com/t5/Wireless-MCU/JN-AN-1220-having-trouble-setting-output-to-off/m-p/740571#M4143</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have been using JN-AN-1220 as a template for my end devices to read sensors on I2C (DIO16/17) and SPI(DO0, DO1, DIO18, DIO0, DIO1).&amp;nbsp; All that works fine.&amp;nbsp; I am using DIO19 to enable battery monitoring. Below is the code I am using to turn the output off at initialize.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: #7f0055; font-size: 10.0pt;"&gt;#define&lt;/STRONG&gt;&lt;SPAN style="font-size: 10.0pt; color: black;"&gt; DIO_READ_BATTERY&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 19&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #3f7f5f;"&gt;// DIO19 is for enabling battery monitoring&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: #7f0055; font-size: 10.0pt;"&gt;#define&lt;/STRONG&gt;&lt;SPAN style="font-size: 10.0pt; color: black;"&gt; DIO_READ_BATTERY_MASK&amp;nbsp;&amp;nbsp;&amp;nbsp; (1 &amp;lt;&amp;lt; DIO_READ_BATTERY)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: black;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;STRONG style="color: #642880; font-size: 10.0pt;"&gt;vAHI_DioSetDirection&lt;/STRONG&gt;&lt;SPAN style="font-size: 10.0pt; color: black;"&gt;(0, DIO_READ_BATTERY_MASK);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: black;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;STRONG style="color: #642880; font-size: 10.0pt;"&gt;vAHI_DioSetPullup&lt;/STRONG&gt;&lt;SPAN style="font-size: 10.0pt; color: black;"&gt;(0, DIO_READ_BATTERY_MASK);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: black;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;STRONG style="color: #642880; background: silver; font-size: 10.0pt;"&gt;vAHI_DioSetOutput&lt;/STRONG&gt;&lt;SPAN style="font-size: 10.0pt; color: black;"&gt;(0, DIO_READ_BATTERY_MASK);&lt;/SPAN&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I also try setting it off during the main loop but still not able to see the output turn off.&amp;nbsp; It stays high all the time. &amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I read up on JN-UG-3087 that it would need to call to u32AHI_Init() to initialize the API functions and before calling to any integrated peripherals API functions.&amp;nbsp; When I search for this function inside JN-AN-1220 LightSensor, it is only called on JN517x chip but I am using JN5169.&amp;nbsp; I am not sure where to go from here. &amp;nbsp; Below is the circuit.&amp;nbsp; Any help is appreciated.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="batteryMonitoringCircuit.PNG"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/36044i0F2F5B00B085A3BF/image-size/large?v=v2&amp;amp;px=999" role="button" title="batteryMonitoringCircuit.PNG" alt="batteryMonitoringCircuit.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Nov 2017 15:17:51 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Wireless-MCU/JN-AN-1220-having-trouble-setting-output-to-off/m-p/740571#M4143</guid>
      <dc:creator>lse</dc:creator>
      <dc:date>2017-11-27T15:17:51Z</dc:date>
    </item>
    <item>
      <title>Re: JN-AN-1220 having trouble setting output to off.</title>
      <link>https://community.nxp.com/t5/Wireless-MCU/JN-AN-1220-having-trouble-setting-output-to-off/m-p/740572#M4144</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Well, I had figure it out after I turn off SPI and DIO19 is working fine as digital output.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I read more on the SPI and seems that DIO19 is SPISEL0 also.&amp;nbsp; When using SPI, SPISEL0 is always used and can't be reassigned unlike SPISEL1/2 that can be assigned to different pins.&amp;nbsp; So what I end up doing was to move the digital output to a different pin.&amp;nbsp; Hope this will help other people in their designs.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Dec 2017 15:05:51 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Wireless-MCU/JN-AN-1220-having-trouble-setting-output-to-off/m-p/740572#M4144</guid>
      <dc:creator>lse</dc:creator>
      <dc:date>2017-12-15T15:05:51Z</dc:date>
    </item>
  </channel>
</rss>

