<?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>Decoding infrared signals with nRF52 Development Kit, is it possible?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/14533/decoding-infrared-signals-with-nrf52-development-kit-is-it-possible</link><description>Hello, we have made cars that play laser tag against eachother using infrared emitters and receivers. The problem is that the infrared radiation bounces off the surroundings, and the cars end up getting hit by themselves. 
 The way it is set up now is</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 05 Sep 2019 00:32:21 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/14533/decoding-infrared-signals-with-nrf52-development-kit-is-it-possible" /><item><title>RE: Decoding infrared signals with nRF52 Development Kit, is it possible?</title><link>https://devzone.nordicsemi.com/thread/208065?ContentTypeID=1</link><pubDate>Thu, 05 Sep 2019 00:32:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6a5c4605-b5b4-4a72-b791-a8495835d5ff</guid><dc:creator>kattaliraees</dc:creator><description>&lt;p&gt;&lt;a href="https://github.com/kattaliraees/nrf52-IR/"&gt;https://github.com/kattaliraees/nrf52-IR/&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Decoding infrared signals with nRF52 Development Kit, is it possible?</title><link>https://devzone.nordicsemi.com/thread/55515?ContentTypeID=1</link><pubDate>Wed, 13 Jul 2016 11:03:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:184b9cf2-b61f-4b49-b1c6-c75931d2735c</guid><dc:creator>Martin Sivertsen</dc:creator><description>&lt;p&gt;Thanks for the feedback!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Decoding infrared signals with nRF52 Development Kit, is it possible?</title><link>https://devzone.nordicsemi.com/thread/55514?ContentTypeID=1</link><pubDate>Wed, 13 Jul 2016 10:24:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9138bb33-08b1-48b8-8cf1-fc70ea012de2</guid><dc:creator>Ole Bauck</dc:creator><description>&lt;p&gt;&amp;quot;Lowerstack&amp;quot; is the &amp;quot;SoftDevice timing critical&amp;quot; according to the figure, &amp;quot;upperstack&amp;quot; is the &amp;quot;SoftDevice API calls and deferrable handling&amp;quot;.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Decoding infrared signals with nRF52 Development Kit, is it possible?</title><link>https://devzone.nordicsemi.com/thread/55513?ContentTypeID=1</link><pubDate>Wed, 13 Jul 2016 10:21:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:72fe1dbc-fecf-4582-a51b-5a59093b94f5</guid><dc:creator>Ole Bauck</dc:creator><description>&lt;p&gt;You can start a timer when the pin goes low (falling edge) and capture, stop and clear the timer when the pin goes high (rising edge). If the capture value is 2.25ms - 0.56ms = 1.69ms, then the value is a logical &amp;quot;1&amp;quot;. If the capture value is 1.12ms - 0.56ms = 0.56ms, then the value is a logical &amp;quot;0&amp;quot;. If the captured value is 4.5ms, then it is the start of the frame.&lt;/p&gt;
&lt;p&gt;To get exact timing you should use PPI to trigger the start task when the pin goes low and the capture, stop and clear task when the pin goes high. You can then retrieve the captured value in the interrupt. The interrupt should run at priority between lowerstack and upperstack to guarantee that the interrupt will be executed before the next capture task (at earliest 1.12ms after the last capture task). If only the lowerstack runs at higher priority, the maximum delay should be 230us + 4us (interrupt latency) if you are in a peripheral connection according to the SoftDevice documentation, see &lt;a href="http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.s132.sds/dita/softdevices/s130/ble_processor_avail_interrupt_latency/ble_peripheral_connection_performance.html?cp=2_3_0_0_15_2_2_1"&gt;here&lt;/a&gt;.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Decoding infrared signals with nRF52 Development Kit, is it possible?</title><link>https://devzone.nordicsemi.com/thread/55512?ContentTypeID=1</link><pubDate>Mon, 04 Jul 2016 09:14:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2dbebf24-60e1-469f-bd87-3447336807b3</guid><dc:creator>Martin Sivertsen</dc:creator><description>&lt;p&gt;Having commented out the app_pwm-parts of the code, I have got the IR-code to send signals in the NEC-protocol standard. The next challenge is to create code that registers the different intervals of the IR-signal (and compares them to pre-existing intervals). I haven&amp;#39;t found any good examples of how to solve this on the nRF52 (just &lt;a href="https://devzone.nordicsemi.com/question/66146/irq-latency-with-softdevice/"&gt;this&lt;/a&gt;), and I&amp;#39;m a bit stumped on where to start.&lt;/p&gt;
&lt;p&gt;As it is now, we use the pin_event_handler to see if there is a change on the pins connected to the IR-receivers, and then register a hit. But I have understood that the pin_event_handler might not be able to register the time intervals of when the pin is low or high, but just register a change on the pins, or am I mistaken?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Decoding infrared signals with nRF52 Development Kit, is it possible?</title><link>https://devzone.nordicsemi.com/thread/55511?ContentTypeID=1</link><pubDate>Mon, 04 Jul 2016 09:11:33 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9c702a7f-3c59-4d7e-b5f3-faa5dac3870a</guid><dc:creator>Martin Sivertsen</dc:creator><description>&lt;p&gt;Hello, and sorry for the late feedback. I am not that well versed in C-programming and have spent the last few weeks reading up and trying to implement an IR-protocol.
I had read a bit about different IR-protocols before, but hadn&amp;#39;t decided on a particular one before embarking on this project. The NEC-protocol seemed like a very robust and simple protocol though.
Luckily, I found &lt;a href="https://devzone.nordicsemi.com/question/57126/infrared-send-driver-time-length-is-not-correct-sometimes-why/"&gt;this&lt;/a&gt; example that Torbjørn Øvrebekk had made (although for nRF51). I managed to port it to nRF52 and integrate it with our existing code.&lt;/p&gt;
&lt;p&gt;I had trouble getting the IR-signal emitting to work together with other functions, and Torbjørn was nice enough to join me and debug the code. He found out that there was a conflict with the app_pwm that was used in our project and the PPI used for the IR-emitting.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Decoding infrared signals with nRF52 Development Kit, is it possible?</title><link>https://devzone.nordicsemi.com/thread/55510?ContentTypeID=1</link><pubDate>Fri, 17 Jun 2016 11:43:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ff463593-57d2-4b99-b834-e54dc50e927b</guid><dc:creator>Ole Bauck</dc:creator><description>&lt;p&gt;Interrupt latency due to forwarding alone is given &lt;a href="http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.s130.sds/dita/softdevices/s130/processor_avail_interrupt_latency/interrupt_latency_soc_framework.html?cp=3_6_2_0_15_0_1"&gt;here&lt;/a&gt;. Latency due to processor usage pattern of the SoftDevice have to be calculated from the information given &lt;a href="http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.s132.sds/dita/softdevices/s130/processor_avail_interrupt_latency/processor_usage_patterns.html?cp=2_3_0_0_15_2"&gt;here&lt;/a&gt;.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Decoding infrared signals with nRF52 Development Kit, is it possible?</title><link>https://devzone.nordicsemi.com/thread/55509?ContentTypeID=1</link><pubDate>Thu, 16 Jun 2016 17:11:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5407508e-c526-4cc7-ba16-073c2547f7ce</guid><dc:creator>SRA</dc:creator><description>&lt;p&gt;Are there average and worst case scenarios listed for the the time on the SoftDevice? Like what we can reasonably expect for how long each event might take?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Decoding infrared signals with nRF52 Development Kit, is it possible?</title><link>https://devzone.nordicsemi.com/thread/55508?ContentTypeID=1</link><pubDate>Thu, 16 Jun 2016 10:30:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1a495314-2b56-448d-b87e-5ad67220d26e</guid><dc:creator>Ole Bauck</dc:creator><description>&lt;p&gt;Yes, doing bit-banging while the SoftDevice is running will lead to some problems where the SoftDevice will interfere with the timing. I think you should be able to do this, but of course it depends on what protocol you are using (how the timing is), how often the SoftDevice interrupts your code (advertising interval or connection interval) and how many other processes your application is doing. If you are check if the data received is corrupt (f.ex. with CRC) and can accept to drop packets I believe this is plausible. You should run the IR code in APP_PRIORITY_HIGH interrupt and consider using capture task together with interrupt to catch the timing.&lt;/p&gt;
&lt;p&gt;Which protocol do you intend to use? I remember using &lt;a href="http://www.sbprojects.com/knowledge/ir/nec.php"&gt;this&lt;/a&gt; protocol a while back on an AVR chip to receive data from an IR remote. This does not have very strict timing so it should be possible to use together with the SoftDevice.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>