<?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 add another ADC into the battery service project?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/14719/how-to-add-another-adc-into-the-battery-service-project</link><description>Hi ,
In my project , i can use the battery service in my project.
But if i want to use the another four ADC channels , how to add it ? 
 my project is working at SDK 9 &amp;amp; s110. 
 Thanks.</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 30 Jun 2016 12:50:05 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/14719/how-to-add-another-adc-into-the-battery-service-project" /><item><title>RE: How to add another ADC into the battery service project?</title><link>https://devzone.nordicsemi.com/thread/56168?ContentTypeID=1</link><pubDate>Thu, 30 Jun 2016 12:50:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:107a575d-2b05-434d-92e2-0234cfd4ce5c</guid><dc:creator>Stefan Birnir Sverrisson</dc:creator><description>&lt;p&gt;Seems that you are mixing a littlebit manual configuration and driver configuration here, not sure how that would mix. I would recommend to either write directly to the ADC registers or always use the driver to configure the ADC.&lt;/p&gt;
&lt;p&gt;When you send a message from the phone via NUS service, the NUS handler should be called, which is the nus_data_handler in the &lt;a href="https://github.com/NordicSemiconductor/nrf51-ADC-examples/blob/nRF51-SDK-9-0-0/ble_app_template__ADC_sampling__app_trace__NUS/main.c"&gt;ADC-UART example&lt;/a&gt;. What happens in the NUS handler? Is any error returned, or why does it not work? Try to debug through it. Debugging is somewhat described &lt;a href="https://devzone.nordicsemi.com/question/60125/my-device-is-freezing-and-restarting/?answer=60126#post-id-60126"&gt;here&lt;/a&gt; and &lt;a href="https://devzone.nordicsemi.com/blogs/821/an-introduction-to-error-handling-in-nrf5-projects/"&gt;here&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to add another ADC into the battery service project?</title><link>https://devzone.nordicsemi.com/thread/56167?ContentTypeID=1</link><pubDate>Tue, 28 Jun 2016 14:40:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:352059d2-9640-4379-b0bb-24de4ff91134</guid><dc:creator>Greed</dc:creator><description>&lt;p&gt;Hi.&lt;/p&gt;
&lt;p&gt;Sorry that i add comment for a long time .&lt;/p&gt;
&lt;p&gt;Using this &lt;a href="https://github.com/NordicSemiconductor/nrf51-ADC-examples/blob/master/simultaneous-adc-sampling-from-two-inputs/main.c"&gt;example&amp;#39;s&lt;/a&gt; mode in my project&amp;#39;s that has NUS &amp;amp; battery service main function .&lt;/p&gt;
&lt;p&gt;I can see the data by terminal in the first . But when i send the data from phone by NUS service , it will stop working.&lt;/p&gt;
&lt;p&gt;I guess that it is error at below picture which initial battery adc_init() and adc1() conflicting.
&lt;img src="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/8764.1.JPG" alt="image description" /&gt;&lt;/p&gt;
&lt;p&gt;Can i add the another ADC into the RTC function?&lt;/p&gt;
&lt;p&gt;Do you have some suggestions?&lt;/p&gt;
&lt;p&gt;Thanks.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to add another ADC into the battery service project?</title><link>https://devzone.nordicsemi.com/thread/56166?ContentTypeID=1</link><pubDate>Fri, 24 Jun 2016 11:41:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:44a36371-87eb-405a-a87a-6b7a39db2e28</guid><dc:creator>Stefan Birnir Sverrisson</dc:creator><description>&lt;p&gt;Hi Greed&lt;/p&gt;
&lt;p&gt;I dont think we have a direct example that shows how to do this, but there is an old example &lt;a href="https://github.com/NordicSemiconductor/nrf51-ADC-examples/blob/master/simultaneous-adc-sampling-from-two-inputs/main.c"&gt;here&lt;/a&gt; that shows an example on how you can sample on multiple pins with the nRF51 ADC. There is also a ADC &lt;a href="https://github.com/NordicSemiconductor/nrf51-ADC-examples/blob/nRF51-SDK-9-0-0/ble_app_template__ADC_sampling__app_trace__NUS/main.c"&gt;example here with softdevice for SDK 9&lt;/a&gt;.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>