<?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>LPCOMP issue with sensing multiple inputs</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/47404/lpcomp-issue-with-sensing-multiple-inputs</link><description>I&amp;#39;m using LPCOMP to sense multiple input. 
 I call the lpcomp_read() function below for each input pin. 
 If I only call this function for 1 pin only, it worked fine. 
 For example: 
 read_value |= lpcomp_read(4) &amp;lt;&amp;lt; 1; &amp;lt;== this would return read_value</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 21 May 2019 12:54:26 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/47404/lpcomp-issue-with-sensing-multiple-inputs" /><item><title>RE: LPCOMP issue with sensing multiple inputs</title><link>https://devzone.nordicsemi.com/thread/188276?ContentTypeID=1</link><pubDate>Tue, 21 May 2019 12:54:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:399ad483-790f-41c6-a342-64ecba84fd54</guid><dc:creator>lance338</dc:creator><description>&lt;p&gt;The delay works. Thank you for the suggestion Kenneth&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: LPCOMP issue with sensing multiple inputs</title><link>https://devzone.nordicsemi.com/thread/188097?ContentTypeID=1</link><pubDate>Tue, 21 May 2019 07:16:37 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:80fad2b2-1cca-4287-8601-12f85fdf20f9</guid><dc:creator>Kenneth</dc:creator><description>&lt;p&gt;I would have tried with a delay (e.g. 50us) or power cycle the LPCOMP when it&amp;#39;s disabled like this:&lt;/p&gt;
&lt;p&gt;*(volatile uint32_t *)0x40013FFC = 0;&lt;br /&gt;*(volatile uint32_t *)0x40013FFC;&lt;br /&gt;*(volatile uint32_t *)0x40013FFC = 1;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: LPCOMP issue with sensing multiple inputs</title><link>https://devzone.nordicsemi.com/thread/188053?ContentTypeID=1</link><pubDate>Tue, 21 May 2019 02:21:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e4b5cfce-1d19-4c4f-8175-65d891ead9da</guid><dc:creator>lance338</dc:creator><description>&lt;p&gt;We don&amp;#39;t need very accurate. Just simply a detection of voltage crossing below/above a level. The ADC has it own challenge in our application. Is there any thing you can think of to get the LPCOMP to work on multiple inputs?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: LPCOMP issue with sensing multiple inputs</title><link>https://devzone.nordicsemi.com/thread/187997?ContentTypeID=1</link><pubDate>Mon, 20 May 2019 14:26:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a05bcca5-2724-440e-94df-b642db506856</guid><dc:creator>Kenneth</dc:creator><description>&lt;p&gt;The LPCOMP is intended to be used for a low power wakeup from sleep when an input drop a specified level, it is not very accurate either. So the way you use it is not as intended, instead the SAADC is better since it will provide a much better reading of the individual pins.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: LPCOMP issue with sensing multiple inputs</title><link>https://devzone.nordicsemi.com/thread/187985?ContentTypeID=1</link><pubDate>Mon, 20 May 2019 14:02:52 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e55e345d-2cdc-4ccc-8fbe-72d205a7d42a</guid><dc:creator>lance338</dc:creator><description>&lt;p&gt;Thanks Kenneth. Tried clearing Event_ready and it doesn&amp;#39;t work. Do I have to wait between enables?&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Also, can you share why the ADC is better for multiple inputs?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: LPCOMP issue with sensing multiple inputs</title><link>https://devzone.nordicsemi.com/thread/187897?ContentTypeID=1</link><pubDate>Mon, 20 May 2019 12:13:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:417a0895-4934-4d3c-8693-34e9df6afab9</guid><dc:creator>Kenneth</dc:creator><description>&lt;p&gt;Have you considered using the SAADC instead? Should be a better solution to read multiple pins.&lt;/p&gt;
&lt;p&gt;In you case maybe you should also clear&amp;nbsp;&lt;span&gt;NRF_LPCOMP-&amp;gt;EVENTS_READY = 0 between &amp;quot;reads&amp;quot;.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>