<?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>Possible to bitbang a 9600baud UART on nRF51822?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/7125/possible-to-bitbang-a-9600baud-uart-on-nrf51822</link><description>Is it possible to bit bang a 9600 baud UART on the nRF51822 while the BLE softdevice is running? 
 The reciprocal of 9600 baud is around 100 &amp;#181;s, so the interrupt handler will need to run about that often for the UART to work reliably. However, the S110</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 01 Dec 2015 10:12:56 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/7125/possible-to-bitbang-a-9600baud-uart-on-nrf51822" /><item><title>RE: Possible to bitbang a 9600baud UART on nRF51822?</title><link>https://devzone.nordicsemi.com/thread/25180?ContentTypeID=1</link><pubDate>Tue, 01 Dec 2015 10:12:56 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:638a7070-75d1-416a-91b4-375333da38c1</guid><dc:creator>los</dc:creator><description>&lt;p&gt;Now I&amp;#39;m advertising @40ms. I&amp;#39;ve not yet tested bit banging in connection. Now I&amp;#39;m trying to solve some issues. @9600bps, timeslot duration is 1240µs, I&amp;#39;ve just discovered duration between two bytes was ~2ms due to timeslot extension failure. Now I&amp;#39;m checking all runs fine and after I will test with with small connection intervals.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Possible to bitbang a 9600baud UART on nRF51822?</title><link>https://devzone.nordicsemi.com/thread/25179?ContentTypeID=1</link><pubDate>Tue, 01 Dec 2015 06:14:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e619d673-e43d-463f-bd37-c372c306d007</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;Hi IOS, good to see that you proved the concept. Can I ask you what type of BLE activity was present at the time of testing UART big banging @9600 baudrate. I am guessing that you should not be using fast connection intervals.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Possible to bitbang a 9600baud UART on nRF51822?</title><link>https://devzone.nordicsemi.com/thread/25181?ContentTypeID=1</link><pubDate>Mon, 30 Nov 2015 16:34:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:51747efd-de7e-4aea-9540-306bdb1ce1cf</guid><dc:creator>los</dc:creator><description>&lt;p&gt;Hi Aryan,&lt;/p&gt;
&lt;p&gt;Using soft device timeslot API to bit bang UART is funny! You will find code in my response from this post :&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/question/33573/nrf51822-debug/"&gt;devzone.nordicsemi.com/.../&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;I only did buffered UART Tx, Tx bytes are buffered and then bit banged using Timer0. After 1 byte transmission, a timeslot extension is queried (querying a new timeslot also works). For timeslot length I added 200µs for processing time to byte transmission duration because I got some SoftDevice errors in soc_radio_timeslot.c l190 . You will find code here :&lt;/p&gt;
&lt;p&gt;&lt;a href="https://github.com/Lahorde/nrf51_template_application/blob/master/libraries/arduino_libraries/AltSoftSerial/AltSoftSerial.cpp"&gt;github.com/.../AltSoftSerial.cpp&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://github.com/Lahorde/nrf51_template_application/blob/master/libraries/timeslot/timeslot.c"&gt;github.com/.../timeslot.c&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Possible to bitbang a 9600baud UART on nRF51822?</title><link>https://devzone.nordicsemi.com/thread/25177?ContentTypeID=1</link><pubDate>Thu, 21 May 2015 01:46:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5ff52154-04c4-4df1-aa4e-07c0a6d3c3e7</guid><dc:creator>RK</dc:creator><description>&lt;p&gt;If that&amp;#39;s what you need then regrettably you&amp;#39;ll need another chip to help you out. Have you looked at any of the UART/SPI/I2C chips out there? I did a quick google and found some dual UARTs with TX/RX,  64-128 bytes of buffer onboard and a single SPI interface for 5-10 bucks a pop. NXP makes one, Maxim makes one, there&amp;#39;s probably others. Unless I already had another component on-board I could use, I&amp;#39;d probably try one of those, should be very easy to interface up.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Possible to bitbang a 9600baud UART on nRF51822?</title><link>https://devzone.nordicsemi.com/thread/25176?ContentTypeID=1</link><pubDate>Wed, 20 May 2015 18:23:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e922e850-84c9-4ba3-9f3f-4d80f2187182</guid><dc:creator>Brendan Shanks</dc:creator><description>&lt;p&gt;Thanks for the discussion but I also need to receive from both devices and there&amp;#39;s no flow control, clearly this can&amp;#39;t all be done on the nRF. Current plan is to use another microcontroller as sort of an I/O processor.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Possible to bitbang a 9600baud UART on nRF51822?</title><link>https://devzone.nordicsemi.com/thread/25178?ContentTypeID=1</link><pubDate>Tue, 19 May 2015 11:36:52 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0a47ed44-0ae9-41f3-b655-4f780ad54357</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;I was answering thinking that the question is to achieve the max speed that is 9600 baud rate. The method you mentioned will work with a flow control enabled bit banging (for RX to work), but the bit rate achieved will be much less.
There is a post for safe attainable baud rate while in connections to be 9600, and this uses hardware UART
&lt;a href="https://devzone.nordicsemi.com/question/884/whats-the-maximum-of-baud-rate-supported-of-uart/"&gt;devzone.nordicsemi.com/.../&lt;/a&gt;
I agree with you RK, its doable, but could be tricky.
@Brendan Shanks : Could I request you to post your progress in Github &lt;a href="https://github.com/NordicSemiconductor"&gt;github.com/NordicSemiconductor&lt;/a&gt;
If you succeed, this could prove useful to many.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Possible to bitbang a 9600baud UART on nRF51822?</title><link>https://devzone.nordicsemi.com/thread/25174?ContentTypeID=1</link><pubDate>Tue, 19 May 2015 10:56:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a73ad530-d16d-46d8-a8d5-65fb73f53b2d</guid><dc:creator>RK</dc:creator><description>&lt;p&gt;I never suggested you needed to get a slot on a regular basis, nor did I suggest asking for a slot as short as 100us. You ask for a slot of 10ms (or similar) which gives you enough time to send around 8 entire characters at 9600 baud plus time to set up and tear down. When you get that slot you now have 10ms during which time you can do the multiple time-critical operations to bitbang out the characters without being interrupted. Then you stop and ask for another slot and when you get that, you send the next 8 characters, or however many fit in the slot.&lt;/p&gt;
&lt;p&gt;Since it&amp;#39;s a UART the important thing is once you send the start bit, you have to send the rest of the character to the stop bit with precise timing. Once you&amp;#39;ve sent the whole character it doesn&amp;#39;t matter when you send the next one, you can have a gap waiting for the next timeslot. I reckon a 10ms timeslot would work ok.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Possible to bitbang a 9600baud UART on nRF51822?</title><link>https://devzone.nordicsemi.com/thread/25173?ContentTypeID=1</link><pubDate>Tue, 19 May 2015 10:33:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6d984fac-2be9-4858-8f7b-93f9dc5653c2</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;You can get a timeslot length of 100us, but you are not guaranteed to get this slot every 100us. I mean to say that timeslot length is not a problem, timeslot interval(periodicity) is. If the connection interval is slow like 100ms or so, then there can be 999 timeslots that can be allocated, but then the softdevice will reject any further request until it uses up its next 270us.
If we are bitbanging flowcontrol and if the radio activity is very less (slow intervals), then MAYBE we can get close to that baudrate, does not seem impossible though&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Possible to bitbang a 9600baud UART on nRF51822?</title><link>https://devzone.nordicsemi.com/thread/25175?ContentTypeID=1</link><pubDate>Tue, 19 May 2015 09:15:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:885d8db1-570b-4616-af23-4e79c5a8dda1</guid><dc:creator>RK</dc:creator><description>&lt;p&gt;Really - the multiprotocol timeslot API section in the manual says the following&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;8.3 Timeslot length
The length of the timeslot is specified by the application in the request and ranges from 100 μs to 100 ms. Longer continuous timeslots can be achieved by requesting to extend the current timeslot. Successive extensions will give a timeslot as long as possible within the limits set by other SoftDevice activities, up to a maximum of 128 s.
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Is that not true - can you not request a timeslot between 100us and 100ms? A 10ms timeslot would allow the OP time to bit-bang out around 8 characters.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Possible to bitbang a 9600baud UART on nRF51822?</title><link>https://devzone.nordicsemi.com/thread/25172?ContentTypeID=1</link><pubDate>Tue, 19 May 2015 09:05:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4d6c588c-eea2-4eea-a038-30eb7a0fa302</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;Hi,
Even with timeslot I think 100us slot are very difficult to fulfill. The softdevice can take upto 270us and this would not be good for this case.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Possible to bitbang a 9600baud UART on nRF51822?</title><link>https://devzone.nordicsemi.com/thread/25171?ContentTypeID=1</link><pubDate>Tue, 19 May 2015 06:10:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f75673ca-b564-4766-8fa5-f124fea2fff0</guid><dc:creator>RK</dc:creator><description>&lt;p&gt;You can&amp;#39;t bit bang it just by using interrupts, no, because indeed you&amp;#39;ll be blocked randomly and will lose timing sync. At 9600baud however one character is just over 1ms, you could use the multiprotocol timeslot api to request a block of time and you get control over the hardware for that block. During that time you push out a number of complete characters, then ask for an extension or relinquish control and request another block and continue when you get more time allocated.&lt;/p&gt;
&lt;p&gt;As long as your data is &amp;#39;bursty&amp;#39; you should be able to send it out without it backing up on you.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>