<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://devzone.nordicsemi.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Detect Lows and highs and rising falling edges on input pin P21</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/101538/detect-lows-and-highs-and-rising-falling-edges-on-input-pin-p21</link><description>Hi, I have a logical line for which the High state can be anything between 4.4V and 2.7V and the low state is 0V. I want to be able to detect high states, low states and rising/falling edges of that line using input pin P21. How should I connect the line</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Sun, 16 Jul 2023 19:50:33 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/101538/detect-lows-and-highs-and-rising-falling-edges-on-input-pin-p21" /><item><title>RE: Detect Lows and highs and rising falling edges on input pin P21</title><link>https://devzone.nordicsemi.com/thread/436601?ContentTypeID=1</link><pubDate>Sun, 16 Jul 2023 19:50:33 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:adc1223d-85ed-4e3a-ace2-f7882047d701</guid><dc:creator>snoopy20</dc:creator><description>&lt;p&gt;There&amp;#39;s something wrong. Post your pin config.&lt;br /&gt;&lt;br /&gt;Here&amp;#39;s some code showing how to detect a signal on a pin and fire the interrupt.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;NRF_GPIO-&amp;gt;PIN_CNF[CFG_PIN_MOTION_ZEROCROSS] = GPIO_PIN_CNF_DIR_Input &amp;lt;&amp;lt; GPIO_PIN_CNF_DIR_Pos;&lt;br /&gt; NRF_GPIOTE-&amp;gt;CONFIG[CFG_GPIOTE_MOTION_ZEROCROSS] = GPIOTE_CONFIG_MODE_Event &amp;lt;&amp;lt; GPIOTE_CONFIG_MODE_Pos | GPIOTE_CONFIG_POLARITY_HiToLo &amp;lt;&amp;lt; GPIOTE_CONFIG_POLARITY_Pos | CFG_PIN_MOTION_ZEROCROSS &amp;lt;&amp;lt; GPIOTE_CONFIG_PSEL_Pos;&lt;/p&gt;
&lt;p&gt;NVIC_SetPriority(GPIOTE_IRQn, CFG_INTERRUPT_PRIORITY_GPIOTE);&lt;br /&gt; NVIC_EnableIRQ(GPIOTE_IRQn);&lt;br /&gt;NRF_GPIOTE-&amp;gt;INTENSET = 1 &amp;lt;&amp;lt; CFG_GPIOTE_MOTION_ZEROCROSS;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;void GPIOTE_IRQHandler (void) {&lt;/p&gt;
&lt;p&gt;...&lt;/p&gt;
&lt;p&gt;&lt;br /&gt; NRF_GPIOTE-&amp;gt;EVENTS_IN[CFG_GPIOTE_MOTION_ZEROCROSS] = 0;&lt;br /&gt; __DSB();&lt;br /&gt;}&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Detect Lows and highs and rising falling edges on input pin P21</title><link>https://devzone.nordicsemi.com/thread/436479?ContentTypeID=1</link><pubDate>Fri, 14 Jul 2023 12:39:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:96b856c7-f234-4775-a8ca-132e091d85bf</guid><dc:creator>Tarik</dc:creator><description>&lt;p&gt;Hi,&lt;br /&gt;&lt;br /&gt;&amp;nbsp;I tried resistors from 300K down to 65K and the high input voltage has increased from 0.9V to 1.2V. which is not enough for high edge detection.&lt;br /&gt;&lt;br /&gt;My original logical high voltage is 4.7V&lt;br /&gt;&lt;br /&gt;Does that mean I should keep lowering the resistance until I get the desired high voltage, or is there something wrong ?&lt;br /&gt;&lt;br /&gt;Thanks&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Detect Lows and highs and rising falling edges on input pin P21</title><link>https://devzone.nordicsemi.com/thread/434950?ContentTypeID=1</link><pubDate>Thu, 06 Jul 2023 11:42:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0efa4be3-cbfb-49c0-8194-db291b2c75c2</guid><dc:creator>snoopy20</dc:creator><description>&lt;p&gt;correct&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Detect Lows and highs and rising falling edges on input pin P21</title><link>https://devzone.nordicsemi.com/thread/434927?ContentTypeID=1</link><pubDate>Thu, 06 Jul 2023 10:53:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0ba63b79-6742-4d95-9308-8332d57b1e61</guid><dc:creator>Tarik</dc:creator><description>&lt;p&gt;I am powering the NRF52 at 3.3V, which means the minimum High logic I can detect is 2.31V, which should still work, right ?&lt;br /&gt;&lt;br /&gt;No problem with noise, as long as it does not trigger false edge detections.&lt;br /&gt;&lt;br /&gt;Thanks for the help&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Detect Lows and highs and rising falling edges on input pin P21</title><link>https://devzone.nordicsemi.com/thread/434926?ContentTypeID=1</link><pubDate>Thu, 06 Jul 2023 10:48:52 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0f22178d-6116-49c0-b5df-c78c5ba115d9</guid><dc:creator>snoopy20</dc:creator><description>&lt;p&gt;Noise suppression and skew. If it&amp;#39;s a digital signal it will have little skew and a 100k -1M will work.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;You must run the NRF52 at 3.6v or the high may not be detected.&lt;br /&gt;&lt;br /&gt;Pin config -&amp;gt; you need to read all the datasheet and learn about the peripherals, specifically GPIOTE and GPIO Latch.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Detect Lows and highs and rising falling edges on input pin P21</title><link>https://devzone.nordicsemi.com/thread/434923?ContentTypeID=1</link><pubDate>Thu, 06 Jul 2023 10:44:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6030ff4b-5ec8-46e7-bbb5-bc8180e266de</guid><dc:creator>Jared</dc:creator><description>&lt;p&gt;As long as you can guarantee that the voltage is within the absolute maximum ratings as stated in the ps, then it should be ok,&lt;/p&gt;
&lt;p&gt;regards&lt;/p&gt;
&lt;p&gt;Jared&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Detect Lows and highs and rising falling edges on input pin P21</title><link>https://devzone.nordicsemi.com/thread/434918?ContentTypeID=1</link><pubDate>Thu, 06 Jul 2023 10:34:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:87e6ac3c-a574-4d43-b896-dd063908e421</guid><dc:creator>Tarik</dc:creator><description>&lt;p&gt;Thanks for the reply.&lt;br /&gt;&lt;br /&gt;I am looking ideally for the cheapest solution, what do you think about adding a series resistor to the pin ?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Detect Lows and highs and rising falling edges on input pin P21</title><link>https://devzone.nordicsemi.com/thread/434917?ContentTypeID=1</link><pubDate>Thu, 06 Jul 2023 10:33:44 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e3f15675-c24b-4c0e-b17d-1faa32ce04b1</guid><dc:creator>Tarik</dc:creator><description>&lt;p&gt;Thanks for the answer,&lt;br /&gt;&lt;br /&gt;Is there any drawback I should consider when using the series 100K resistor ?&lt;br /&gt;&lt;br /&gt;Also what Pin configuration do you recommend using ?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Detect Lows and highs and rising falling edges on input pin P21</title><link>https://devzone.nordicsemi.com/thread/434890?ContentTypeID=1</link><pubDate>Thu, 06 Jul 2023 09:26:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:73c050d9-02f7-44cc-a7a3-823d4025d55b</guid><dc:creator>Jared</dc:creator><description>&lt;p&gt;Hi there,&lt;/p&gt;
&lt;p&gt;You need a level converter or a resistor to drop the voltage down, as the maximum voltage on the GPIO can be VDD +0V3, where VDD can be anywhere between 1V7 to 3V6,&lt;/p&gt;
&lt;p&gt;regards&lt;/p&gt;
&lt;p&gt;Jared&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Detect Lows and highs and rising falling edges on input pin P21</title><link>https://devzone.nordicsemi.com/thread/434741?ContentTypeID=1</link><pubDate>Wed, 05 Jul 2023 14:02:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ae775bc2-6799-4133-a681-d2059dc9fb2c</guid><dc:creator>snoopy20</dc:creator><description>&lt;p&gt;Basics -&lt;br /&gt;&lt;br /&gt;832 is a 3.6v part, 4.4v will destroy it. You should limit it with a high resistor enough to not damage the protection diodes. 100k should work. If it&amp;#39;s a digital input then generally the high signal has to be above Vdd * 0.7, so if you&amp;#39;re running 3.6v for Vdd then 2.7v is above the minimum (2.52v), so will be detected.&lt;br /&gt;&lt;br /&gt;If the signal has high slew then you may need to consider the comparator.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>