<?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>how to use 3 channels of ADC in non blockin mode?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/21745/how-to-use-3-channels-of-adc-in-non-blockin-mode</link><description>Hello all,
am trying to configure 3 adc channels in a way to have conversion in 3 differents pins, without usin timer and ppi. so I implement the following code, the problem is that I have a static error in a channel which is supposed to be null, for</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 02 May 2017 14:36:05 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/21745/how-to-use-3-channels-of-adc-in-non-blockin-mode" /><item><title>RE: how to use 3 channels of ADC in non blockin mode?</title><link>https://devzone.nordicsemi.com/thread/85401?ContentTypeID=1</link><pubDate>Tue, 02 May 2017 14:36:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cfa13178-68d1-4e90-a7b7-9a9915b4c3b8</guid><dc:creator>acha</dc:creator><description>&lt;p&gt;I don&amp;#39;t understand your code. First you initialize all 3 channels, then you use some flag to indicate which channel is enabled, then you setup three different buffers for conversion (only two buffers can be setup for conversion at a time), and then uninit two of he channels in the callback. &lt;strong&gt;&lt;strong&gt;-&amp;gt;&lt;/strong&gt; the idea is to have is to made conversion in only one channel in each interruption, now i resolve the problem to have conversion for all channels using p_event-&amp;gt;data.done.p_buffer  buffer.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;I also don&amp;#39;t understand why you are sampling unconnected inputs. Are you getting wrong samples with inputs connected? &lt;strong&gt;-&amp;gt; Juste to be sure that nothing hapens in the non connected pins.&lt;/strong&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: how to use 3 channels of ADC in non blockin mode?</title><link>https://devzone.nordicsemi.com/thread/85400?ContentTypeID=1</link><pubDate>Tue, 02 May 2017 11:09:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2903183c-dbbe-4378-bec8-b84fdebbdf04</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;I don&amp;#39;t understand your code. First you initialize all 3 channels, then you use some flag to indicate which channel is enabled, then you setup three different buffers for conversion (only two buffers can be setup for conversion at a time), and then uninit two of he channels in the callback.&lt;/p&gt;
&lt;p&gt;You can use scan mode to sample all three channels at once. The samples will be stored in the buffer like this: [channel0,channel1,channel2,channel0,...]. You can find an example of how to use scan mode &lt;a href="https://github.com/NordicSemiconductor/nrf51-ADC-examples/tree/master/adc_timer_driven_scan_mode"&gt;on our Github&lt;/a&gt;. This can easily be changed to call the &lt;code&gt;nrf_drv_saadc_sample&lt;/code&gt; manually if you don&amp;#39;t want to use timer/PPI.&lt;/p&gt;
&lt;p&gt;I also don&amp;#39;t understand why you are sampling unconnected inputs. Are you getting wrong samples with inputs connected?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>