<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.shiverware.com/index.php?action=history&amp;feed=atom&amp;title=Rainboard_NewSoftSerial</id>
	<title>Rainboard NewSoftSerial - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.shiverware.com/index.php?action=history&amp;feed=atom&amp;title=Rainboard_NewSoftSerial"/>
	<link rel="alternate" type="text/html" href="https://wiki.shiverware.com/index.php?title=Rainboard_NewSoftSerial&amp;action=history"/>
	<updated>2026-04-10T00:56:35Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.33.1</generator>
	<entry>
		<id>https://wiki.shiverware.com/index.php?title=Rainboard_NewSoftSerial&amp;diff=54&amp;oldid=prev</id>
		<title>BrettThePark at 04:22, 26 October 2011</title>
		<link rel="alternate" type="text/html" href="https://wiki.shiverware.com/index.php?title=Rainboard_NewSoftSerial&amp;diff=54&amp;oldid=prev"/>
		<updated>2011-10-26T04:22:21Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;Revision as of 04:22, 26 October 2011&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l229&quot; &gt;Line 229:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 229:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;The new values were just found by trial and error. Perhaps with some more time and greater insight more accurate values could be used.&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;The new values were just found by trial and error. Perhaps with some more time and greater insight more accurate values could be used.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;== External Links ==&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;lt;references/&amp;gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;{{Comments}}&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>BrettThePark</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.shiverware.com/index.php?title=Rainboard_NewSoftSerial&amp;diff=53&amp;oldid=prev</id>
		<title>BrettThePark at 04:21, 26 October 2011</title>
		<link rel="alternate" type="text/html" href="https://wiki.shiverware.com/index.php?title=Rainboard_NewSoftSerial&amp;diff=53&amp;oldid=prev"/>
		<updated>2011-10-26T04:21:07Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;Revision as of 04:21, 26 October 2011&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l133&quot; &gt;Line 133:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 133:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Now bytes 7, 8, and 9 are correct but start going bad at byte 10 again. At this point we can assume that maybe the timing of reading data is slightly off (as we are using software not hardware). During &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;[&lt;/del&gt;http://en.wikipedia.org/wiki/Asynchronous_serial_communication &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;Serial Communication] &lt;/del&gt;there are actually 10 bits sent per byte. The first or &amp;quot;start&amp;quot; bit signals the start of a transmitting byte and occurs when the line goes from 1 to 0 and the last bit (stop bit) is a 1. If the process of grabbing the data off the line was slightly slow, it would be possible to accidentally read the stop bit as if it were actually part of the data. At first you might think that if this was the case the bad 1 value would occur at the end of the byte. However, the serial line is transferring the bits with the least significant bit (lsb) first.&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Now bytes 7, 8, and 9 are correct but start going bad at byte 10 again. At this point we can assume that maybe the timing of reading data is slightly off (as we are using software not hardware). During &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Serial Communication &amp;lt;ref&amp;gt;&lt;/ins&gt;http://en.wikipedia.org/wiki/Asynchronous_serial_communication&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;&amp;lt;/ref&amp;gt; &lt;/ins&gt;there are actually 10 bits sent per byte. The first or &amp;quot;start&amp;quot; bit signals the start of a transmitting byte and occurs when the line goes from 1 to 0 and the last bit (stop bit) is a 1. If the process of grabbing the data off the line was slightly slow, it would be possible to accidentally read the stop bit as if it were actually part of the data. At first you might think that if this was the case the bad 1 value would occur at the end of the byte. However, the serial line is transferring the bits with the least significant bit (lsb) first.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;For example:&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;For example:&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>BrettThePark</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.shiverware.com/index.php?title=Rainboard_NewSoftSerial&amp;diff=50&amp;oldid=prev</id>
		<title>BrettThePark: Created page with &quot;During testing an issue appeared while using version 11b of NewSoftSerial.   In order to make sure everything was going correctly, the arduino was set up to echo back any bytes t...&quot;</title>
		<link rel="alternate" type="text/html" href="https://wiki.shiverware.com/index.php?title=Rainboard_NewSoftSerial&amp;diff=50&amp;oldid=prev"/>
		<updated>2011-10-26T04:07:15Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;During testing an issue appeared while using version 11b of NewSoftSerial.   In order to make sure everything was going correctly, the arduino was set up to echo back any bytes t...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;During testing an issue appeared while using version 11b of NewSoftSerial. &lt;br /&gt;
&lt;br /&gt;
In order to make sure everything was going correctly, the arduino was set up to echo back any bytes that it received via the software serial connection. This presented an error. In total, 16 bytes were send in one burst and 15 bytes were received back.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
f0:7f:7f:03:00:00:7f:01:7f:00:00:02:00:7f:00:f7 // Data Sent&lt;br /&gt;
f0:7f:7f:03:80:80:bf:80:bf:80:80:81:80:01:dd //Data received&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As you can see by the data received the first few bytes work fine, but as time goes on the bytes are not correct but still seem to be in some sort of order.&lt;br /&gt;
&lt;br /&gt;
Lets look closer at the binary version of the data&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;2&amp;quot; style=&amp;quot;font-family: monospace;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!scope=&amp;quot;col&amp;quot;| Byte&lt;br /&gt;
!scope=&amp;quot;col&amp;quot;| Sent Hex&lt;br /&gt;
!scope=&amp;quot;col&amp;quot;| Received Hex&lt;br /&gt;
!scope=&amp;quot;col&amp;quot;| Sent Binary&lt;br /&gt;
!scope=&amp;quot;col&amp;quot;| Received Binary&lt;br /&gt;
|-&lt;br /&gt;
!scope=&amp;quot;row&amp;quot;| 1&lt;br /&gt;
| 0xF0&lt;br /&gt;
| 0XF0&lt;br /&gt;
| 11110000&lt;br /&gt;
| 11110000&lt;br /&gt;
|-&lt;br /&gt;
!scope=&amp;quot;row&amp;quot;| 2&lt;br /&gt;
| 0x7F&lt;br /&gt;
| 0X7F&lt;br /&gt;
| 01111111&lt;br /&gt;
| 01111111&lt;br /&gt;
|-&lt;br /&gt;
!scope=&amp;quot;row&amp;quot;| 3&lt;br /&gt;
| 0x7F&lt;br /&gt;
| 0X7F&lt;br /&gt;
| 01111111&lt;br /&gt;
| 01111111&lt;br /&gt;
|-&lt;br /&gt;
!scope=&amp;quot;row&amp;quot;| 4&lt;br /&gt;
| 0x03&lt;br /&gt;
| 0X03&lt;br /&gt;
| 00000011&lt;br /&gt;
| 00000011&lt;br /&gt;
|-&lt;br /&gt;
!scope=&amp;quot;row&amp;quot;| 5&lt;br /&gt;
| 0x00&lt;br /&gt;
| 0X80&lt;br /&gt;
| 00000000&lt;br /&gt;
| 10000000&lt;br /&gt;
|-&lt;br /&gt;
!scope=&amp;quot;row&amp;quot;| 6&lt;br /&gt;
| 0x00&lt;br /&gt;
| 0X80&lt;br /&gt;
| 00000000&lt;br /&gt;
| 10000000&lt;br /&gt;
|-&lt;br /&gt;
!scope=&amp;quot;row&amp;quot;| 7&lt;br /&gt;
| 0x7F&lt;br /&gt;
| 0XBF&lt;br /&gt;
| 01111111&lt;br /&gt;
| 10111111&lt;br /&gt;
|-&lt;br /&gt;
!scope=&amp;quot;row&amp;quot;| 8&lt;br /&gt;
| 0x01&lt;br /&gt;
| 0X80&lt;br /&gt;
| 00000001&lt;br /&gt;
| 10000000&lt;br /&gt;
|-&lt;br /&gt;
!scope=&amp;quot;row&amp;quot;| 9&lt;br /&gt;
| 0x7F&lt;br /&gt;
| 0XBF&lt;br /&gt;
| 01111111&lt;br /&gt;
| 10111111&lt;br /&gt;
|-&lt;br /&gt;
!scope=&amp;quot;row&amp;quot;| 10&lt;br /&gt;
| 0x00&lt;br /&gt;
| 0X80&lt;br /&gt;
| 00000000&lt;br /&gt;
| 10000000&lt;br /&gt;
|-&lt;br /&gt;
!scope=&amp;quot;row&amp;quot;| 11&lt;br /&gt;
| 0x00&lt;br /&gt;
| 0X80&lt;br /&gt;
| 00000000&lt;br /&gt;
| 10000000&lt;br /&gt;
|-&lt;br /&gt;
!scope=&amp;quot;row&amp;quot;| 12&lt;br /&gt;
| 0x02&lt;br /&gt;
| 0X81&lt;br /&gt;
| 00000010&lt;br /&gt;
| 10000001&lt;br /&gt;
|-&lt;br /&gt;
!scope=&amp;quot;row&amp;quot;| 13&lt;br /&gt;
| 0x00&lt;br /&gt;
| 0X80&lt;br /&gt;
| 00000000&lt;br /&gt;
| 10000000&lt;br /&gt;
|-&lt;br /&gt;
!scope=&amp;quot;row&amp;quot;| 14&lt;br /&gt;
| 0x7F&lt;br /&gt;
| 0X01&lt;br /&gt;
| 01111111&lt;br /&gt;
| 00000001&lt;br /&gt;
|-&lt;br /&gt;
!scope=&amp;quot;row&amp;quot;| 15&lt;br /&gt;
| 0x00&lt;br /&gt;
| 0XDD&lt;br /&gt;
| 00000000&lt;br /&gt;
| 11011101&lt;br /&gt;
|-&lt;br /&gt;
!scope=&amp;quot;row&amp;quot;| 16&lt;br /&gt;
| 0xF7&lt;br /&gt;
| &lt;br /&gt;
| 11110111&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Everything up to bytes 5 is identical. Lets layout the binary in a stream.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
|  byte5| byte 6| byte 7| byte 8| byte 9| byte10| byte11| byte12| byte13| byte14| byte15| byte16|&lt;br /&gt;
000000000000000001111111000000010111111100000000000000000000001000000000011111110000000011110111 //sent&lt;br /&gt;
1000000010000000101111111000000010111111100000001000000010000001100000000000000111011101 //recv&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For byte 5 and bytes 6 the only problem is that the first bit of each packet has been changed to a 1 from a 0. Byte 7 received then begins with a 1 when it should also start with a 0. However, if we were to erase the first bit of byte 7, things start lining up again:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
|  byte5| byte 6| byte 7| byte 8| byte 9| byte10| byte11| byte12| byte13| byte14| byte15| byte16|&lt;br /&gt;
000000000000000001111111000000010111111100000000000000000000001000000000011111110000000011110111 //sent&lt;br /&gt;
100000001000000001111111000000010111111100000001000000010000001100000000000000111011101 //recv&lt;br /&gt;
                1 was erased&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now bytes 7, 8, and 9 are correct but start going bad at byte 10 again. At this point we can assume that maybe the timing of reading data is slightly off (as we are using software not hardware). During [http://en.wikipedia.org/wiki/Asynchronous_serial_communication Serial Communication] there are actually 10 bits sent per byte. The first or &amp;quot;start&amp;quot; bit signals the start of a transmitting byte and occurs when the line goes from 1 to 0 and the last bit (stop bit) is a 1. If the process of grabbing the data off the line was slightly slow, it would be possible to accidentally read the stop bit as if it were actually part of the data. At first you might think that if this was the case the bad 1 value would occur at the end of the byte. However, the serial line is transferring the bits with the least significant bit (lsb) first.&lt;br /&gt;
&lt;br /&gt;
For example:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
Sending 0x00 // hex&lt;br /&gt;
                    Byte: 00000000  //binary&lt;br /&gt;
With Start and stop Bits:0000000001 //&lt;br /&gt;
&lt;br /&gt;
First we change the serial line from 1 to 0 this causes the receiver to know a byte is coming:&lt;br /&gt;
&lt;br /&gt;
0000000001 &lt;br /&gt;
|&lt;br /&gt;
&lt;br /&gt;
Then we start sending data from right to left (not including the stop byte)&lt;br /&gt;
0000000001 &lt;br /&gt;
        |&lt;br /&gt;
0000000001 &lt;br /&gt;
       |&lt;br /&gt;
0000000001 &lt;br /&gt;
      |&lt;br /&gt;
0000000001 &lt;br /&gt;
     |&lt;br /&gt;
0000000001 &lt;br /&gt;
    |&lt;br /&gt;
0000000001 &lt;br /&gt;
   |&lt;br /&gt;
0000000001 &lt;br /&gt;
  |&lt;br /&gt;
0000000001 &lt;br /&gt;
 |&lt;br /&gt;
0000000001 &lt;br /&gt;
         |&lt;br /&gt;
&lt;br /&gt;
Another example:&lt;br /&gt;
If we number all the bits: 12345678&lt;br /&gt;
&lt;br /&gt;
We send the data like so: Start Bit 8 7 6 5 4 3 2 1 Stop Bit&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
So the end result that if the timing is off and the stop bit is accidentally read, it will cause the most significant bit (msb) of the byte to be a 1.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Solution ==&lt;br /&gt;
&lt;br /&gt;
The solution is to alter the timing of the NewSoftSerial parameters to work slightly faster than they are.&lt;br /&gt;
&lt;br /&gt;
In our particular example we are operating at 57600 baud on a 16Mhz processor. If we look in the cpp file for NewSoftSerial library we can find this table.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
static const DELAY_TABLE PROGMEM table[] = &lt;br /&gt;
{&lt;br /&gt;
  //  baud    rxcenter   rxintra    rxstop    tx&lt;br /&gt;
  { 115200,   1,         17,        17,       12,    },&lt;br /&gt;
  { 57600,    10,        37,        37,       33,    },&lt;br /&gt;
  { 38400,    25,        57,        57,       54,    },&lt;br /&gt;
  { 31250,    31,        70,        70,       68,    },&lt;br /&gt;
  { 28800,    34,        77,        77,       74,    },&lt;br /&gt;
  { 19200,    54,        117,       117,      114,   },&lt;br /&gt;
  { 14400,    74,        156,       156,      153,   },&lt;br /&gt;
  { 9600,     114,       236,       236,      233,   },&lt;br /&gt;
  { 4800,     233,       474,       474,      471,   },&lt;br /&gt;
  { 2400,     471,       950,       950,      947,   },&lt;br /&gt;
  { 1200,     947,       1902,      1902,     1899,  },&lt;br /&gt;
  { 300,      3804,      7617,      7617,     7614,  },&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
There are three timings we are interested in.&lt;br /&gt;
&lt;br /&gt;
rxcenter: This is the time it takes to go from the edge of the start bit to about half way through the bit (in order to center reading).&lt;br /&gt;
&lt;br /&gt;
rxintra: This is the time to wait between sampling bits of the data&lt;br /&gt;
&lt;br /&gt;
rxstop: This is the time to wait for the stop bit to finish being sent.&lt;br /&gt;
&lt;br /&gt;
In order to speed things up slightly the rxcenter has been modified to be 8 so the bits are caught slightly closer to the start and the rxstop has been altered so we don&amp;#039;t take quite as long waiting for the stop bit. This solves the problem by kicking out of the interrupt slightly quicker which allows it to be called again faster in situations where a lot of data is being sent all at once.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
static const DELAY_TABLE PROGMEM table[] = &lt;br /&gt;
{&lt;br /&gt;
  //  baud    rxcenter   rxintra    rxstop    tx&lt;br /&gt;
  { 115200,   1,         17,        17,       12,    },&lt;br /&gt;
  { 57600,     8,        37,        30,       33,    }, //Changed rxCenter to 8 and rxstop to 30&lt;br /&gt;
  { 38400,    25,        57,        57,       54,    },&lt;br /&gt;
  { 31250,    31,        70,        70,       68,    },&lt;br /&gt;
  { 28800,    34,        77,        77,       74,    },&lt;br /&gt;
  { 19200,    54,        117,       117,      114,   },&lt;br /&gt;
  { 14400,    74,        156,       156,      153,   },&lt;br /&gt;
  { 9600,     114,       236,       236,      233,   },&lt;br /&gt;
  { 4800,     233,       474,       474,      471,   },&lt;br /&gt;
  { 2400,     471,       950,       950,      947,   },&lt;br /&gt;
  { 1200,     947,       1902,      1902,     1899,  },&lt;br /&gt;
  { 300,      3804,      7617,      7617,     7614,  },&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The new values were just found by trial and error. Perhaps with some more time and greater insight more accurate values could be used.&lt;/div&gt;</summary>
		<author><name>BrettThePark</name></author>
		
	</entry>
</feed>