
<p>
<span style="color: windowtext;">
Hello, again. This is Trey.&nbsp;</span>
</p>
<p>
<span style="color: windowtext;">
&nbsp;</span>
</p>
<p>
<span style="color: windowtext;">
Welcome to part 6 in my Cheap Yellow Display (CYD) Project series.&nbsp;Thank you for hanging in there with me on this rambling series.&nbsp;If you wish to catch up on earlier episodes, you can find them on my </span>
<a href="https://www.hackerpublicradio.org/correspondents/0394.html" rel="noopener noreferrer" target="_blank">
HPR profile page</a>
<span style="color: windowtext;">
 </span>
<a href="https://www.hackerpublicradio.org/correspondents/0394.html" rel="noopener noreferrer" target="_blank">
https://www.hackerpublicradio.org/correspondents/0394.html</a>
<span style="color: windowtext;">
&nbsp;&nbsp;</span>
</p>
<p>
<span style="color: windowtext;">
&nbsp;</span>
</p>
<p>
<span style="color: windowtext;">
To review, my project is to build a portable morse code "Keyer memory" which can be connected to any of my amateur HF transceiver radios by simply plugging it in to the code key input port.&nbsp;This is based around an ESP32 platform which comes prepackaged&nbsp;on a yellow PC board with a color touchscreen display, WIFI, and Bluetooth.&nbsp;We fondly call this contraption the Cheap Yellow Display.&nbsp;&nbsp;&nbsp;</span>
</p>
<p>
<span style="color: windowtext;">
&nbsp;</span>
</p>
<p>
<span style="color: windowtext;">
So far, I have defined the necessities, collected the required hardware, and failed miserably building the graphical user interface (GUI).&nbsp;&nbsp;</span>
</p>
<p>
<span style="color: windowtext;">
&nbsp;</span>
</p>
<p>
<span style="color: windowtext;">
While I sort out the technical challenges getting my GUI code to play nicely with the CYD's&nbsp;touchscreen, it is important that we spend some time discussing Morse code itself, and the timing standards we will need to follow.&nbsp;</span>
</p>
<p>
<span style="color: windowtext;">
&nbsp;</span>
</p>
<p>
<span style="color: windowtext;">
I am not going to dive too deeply into the history behind telegraphs and Morse code, but it is very interesting.&nbsp;If you want to learn more, Wikipedia has the origins and evolution written out quite nicely at </span>
<a href="https://en.wikipedia.org/wiki/Morse_code" rel="noopener noreferrer" target="_blank">
https://en.wikipedia.org/wiki/Morse_code</a>
<span style="color: windowtext;">
&nbsp;&nbsp;</span>
</p>
<p>
<span style="color: windowtext;">
&nbsp;</span>
</p>
<p>
<span style="color: windowtext;">
For our purposes, we will fast forward from the year 1820 (When telegraphy began) all the way to 1865 when the International Telecommunication Union (ITU)&nbsp; standardized, what it called&nbsp;"International Morse Code".&nbsp;When I say Morse Code for the remainder of this podcast, I am referring to this ITU International Morse Code.&nbsp;&nbsp;&nbsp;</span>
</p>
<p>
<span style="color: windowtext;">
&nbsp;</span>
</p>
<p>
<span style="color: windowtext;">
Morse code typically includes the following characters:&nbsp;</span>
</p>
<p>
<br>
</p>
<ul>
<li>
<span style="color: windowtext;">
The 26 letter basic Latin alphabet&nbsp;</span>
</li>
<li>
<span style="color: windowtext;">
The Indo-Arabic numerals 0 to 9&nbsp;</span>
</li>
</ul>
<p>
<span style="color: windowtext;">
&nbsp;</span>
</p>
<p>
<span style="color: windowtext;">
There is also a single accented Latin letter (É), which is written as an E with an accent mark, and a handful of punctuation marks.&nbsp;</span>
</p>
<p>
<span style="color: windowtext;">
&nbsp;</span>
</p>
<p>
<span style="color: windowtext;">
These characters are encoded using a sequence of short and long signals.&nbsp;Each short signal is referred to as a </span>
<em style="color: windowtext;">
dit</em>
<span style="color: windowtext;">
.&nbsp;Each long signal is referred to as a </span>
<em style="color: windowtext;">
dah</em>
<span style="color: windowtext; background-color: inherit;">
. At a young age, I began to refer to them as dots and dashes, as this is how they are usually written.&nbsp;For example, the letter "A"&nbsp;consists of a single dit followed by a single dah.&nbsp;When written out this would look like a period followed by a hyphen (what some might call a minus sign)&nbsp;&nbsp;&nbsp;.-&nbsp;</span>
<span style="color: windowtext;">
&nbsp;</span>
</p>
<p>
<span style="color: windowtext;">
&nbsp;</span>
</p>
<p>
<span style="color: windowtext;">
This encoding method allows messages to be sent by </span>
<span style="color: windowtext; background-color: inherit;">
turning on and off an electrical signal.&nbsp;This could result in a light flashing or a tone sounding to the pattern of the signal.&nbsp;The timing of a dit and dah, along with the spacing between them is carefully defined.&nbsp;&nbsp;</span>
<span style="color: windowtext;">
&nbsp;</span>
</p>
<p>
<span style="color: windowtext;">
&nbsp;</span>
</p>
<p>
<span style="color: windowtext; background-color: inherit;">
Morsecode.world does a great job explaining the timing, and you can find their explanation at </span>
<a href="https://morsecode.world/international/timing/" rel="noopener noreferrer" target="_blank">
https://morsecode.world/international/timing/</a>
<span style="color: windowtext;">
&nbsp;&nbsp;</span>
</p>
<p>
<span style="color: windowtext;">
&nbsp;</span>
</p>
<p>
<span style="color: windowtext; background-color: inherit;">
It all starts with the dit, or more accurately, the amount of time the dit signal is turned on.&nbsp;We will call this length of time 1 unit.&nbsp;We will get to the actual length of time for a unit later in this episode.&nbsp;For now, it is just one unit.</span>
<span style="color: windowtext;">
&nbsp;</span>
</p>
<p>
<span style="color: windowtext;">
&nbsp;</span>
</p>
<p>
<span style="color: windowtext; background-color: inherit;">
So, if a dit is 1 unit long, a dah will be 3 units long, so there is an obvious and consistent difference between a dit and a dah.&nbsp;Also, empty space between elements of the same character is 1 unit long.&nbsp;The space between characters should be 3 units long.</span>
<span style="color: windowtext;">
&nbsp;</span>
</p>
<p>
<span style="color: windowtext;">
&nbsp;&nbsp;&nbsp;&nbsp;</span>
</p>
<p>
<span style="color: windowtext;">
Let's demonstrate using the letters H, P, &amp; R.&nbsp;&nbsp;&nbsp;</span>
</p>
<p>
<span style="color: windowtext;">
&nbsp;</span>
</p>
<p>
<span style="color: windowtext; background-color: inherit;">
An "H" would be 4 dits ….</span>
<span style="color: windowtext;">
&nbsp;</span>
</p>
<p>
<span style="color: windowtext; background-color: inherit;">
A "P" would be 1 dit followed by 2 dahs and ending with 1 dit&nbsp;&nbsp;.--.</span>
<span style="color: windowtext;">
&nbsp;</span>
</p>
<p>
<span style="color: windowtext; background-color: inherit;">
An "R" would be 1 dit followed by 1 dah and ending with 1 dit&nbsp;&nbsp;&nbsp;.-.</span>
<span style="color: windowtext;">
&nbsp;</span>
</p>
<p>
<span style="color: windowtext;">
&nbsp;</span>
</p>
<p>
<span style="color: windowtext;">
Remember when we send these grouped together like a word, we need 3 units of spacing between each character.&nbsp;You can hear this now. This is Morse code for the letters "HPR" at 15 words per minute&nbsp;&nbsp;.... .--. .-.&nbsp;</span>
</p>
<p>
<span style="color: windowtext;">
&nbsp;</span>
</p>
<p>
<span style="color: windowtext;">
That is the perfect segue to the next section, words per minute.&nbsp;</span>
</p>
<p>
<span style="color: windowtext;">
&nbsp;</span>
</p>
<p>
<span style="color: windowtext; background-color: inherit;">
The speed of morse code is measured in "words per minute".&nbsp;But how do you calculate this when some characters are short (Like the letter "E" which is only a single dit long), and other characters are long (Like the letter "J" which starts with a single dit and is followed by 3 dahs)?</span>
<span style="color: windowtext;">
&nbsp;</span>
</p>
<p>
<span style="color: windowtext;">
&nbsp;</span>
</p>
<p>
<span style="color: windowtext;">
And that's just letters.&nbsp;What about words?&nbsp;We have short words and long words.&nbsp;How can we standardize on words per minute with so much diversity of length?&nbsp;</span>
</p>
<p>
<span style="color: windowtext;">
&nbsp;</span>
</p>
<p>
<span style="color: windowtext;">
Well, thanks to the French, we have a quite elegant solution to this problem.&nbsp;Well, not the French in general.&nbsp;Just PARIS.&nbsp;</span>
</p>
<p>
<span style="color: windowtext;">
&nbsp;</span>
</p>
<p>
<span style="color: windowtext;">
PARIS is the standard word which has been agreed upon to be used for determining the speed of Morse code.&nbsp;The word PARIS is 50 units long.&nbsp;</span>
</p>
<p>
<span style="color: windowtext;">
&nbsp;</span>
</p>
<p>
<span style="color: windowtext; background-color: inherit;">
"P" = dit(1) + (1) + dah(3) + (1) + dah(3) + (1) + dit(1) = 11 units</span>
<span style="color: windowtext;">
&nbsp;</span>
</p>
<p>
<span style="color: windowtext;">
{Space between letters} = 3 units&nbsp;</span>
</p>
<p>
<span style="color: windowtext;">
"A" =&nbsp;</span>
<span style="color: windowtext; background-color: inherit;">
dit(1) + (1) + dah(3) = 5 units</span>
<span style="color: windowtext;">
&nbsp;</span>
</p>
<p>
<span style="color: windowtext;">
{Space between letters} = 3 units&nbsp;</span>
</p>
<p>
<span style="color: windowtext;">
"R" = </span>
<span style="color: windowtext; background-color: inherit;">
dit(1) + (1) + dah(3) + (1) + dit(1) = 7 units</span>
<span style="color: windowtext;">
&nbsp;</span>
</p>
<p>
<span style="color: windowtext;">
{Space between letters} = 3 units&nbsp;</span>
</p>
<p>
<span style="color: windowtext;">
"I" = </span>
<span style="color: windowtext; background-color: inherit;">
dit(1) + (1) + dit(1) = 3 units</span>
<span style="color: windowtext;">
&nbsp;</span>
</p>
<p>
<span style="color: windowtext;">
{Space between letters} = 3 units&nbsp;</span>
</p>
<p>
<span style="color: windowtext;">
"S" = </span>
<span style="color: windowtext; background-color: inherit;">
dit(1) + (1) + dit(1) </span>
<span style="color: windowtext;">
+ (1) + </span>
<span style="color: windowtext; background-color: inherit;">
dit(1) </span>
<span style="color: windowtext;">
= 5 units&nbsp;</span>
</p>
<p>
<span style="color: windowtext;">
{Space between words} = 7 units&nbsp;</span>
</p>
<p>
<span style="color: windowtext;">
&nbsp;</span>
</p>
<p>
<span style="color: windowtext;">
11+3+5+3+7+3+3+3+5+7 = 50 units&nbsp;</span>
</p>
<p>
<span style="color: windowtext;">
&nbsp;</span>
</p>
<p>
<span style="color: windowtext;">
Here is the word PARIS sent at 15 WPM&nbsp;&nbsp;.--. .- .-. .. ...&nbsp;</span>
</p>
<p>
<span style="color: windowtext;">
&nbsp;</span>
</p>
<p>
<span style="color: windowtext; background-color: inherit;">
Morsecode.world again does a great job explaining the maths for how many milliseconds long a dit should be for a specific WPM of code&nbsp;(</span>
<a href="https://morsecode.world/international/timing/" rel="noopener noreferrer" target="_blank">
https://morsecode.world/international/timing/</a>
<span style="color: windowtext;">
 )&nbsp;But, no... We could not keep it that simple.&nbsp;Some guy named </span>
<span style="color: windowtext; background-color: inherit;">
Donald R. "Russ" Farnsworth had to complicate things and increase the gaps between letters and words to make interpreting code much easier.&nbsp;There are even more maths for Farnsworth timing...</span>
<span style="color: windowtext;">
&nbsp;</span>
</p>
<p>
<span style="color: windowtext;">
&nbsp;</span>
</p>
<p>
<span style="color: windowtext; background-color: inherit;">
Wait a minute.&nbsp;When did I start saying "Maths" instead of "Math" like a normal North American?&nbsp;What is the reasoning around pluralizing "Math" anyways?&nbsp;Which way is more original English, "Math" or "Maths"?&nbsp;This sounds like a show idea for someone other than me. If you know or are interested in researching it, I look forward to listening to your show in the future.</span>
<span style="color: windowtext;">
&nbsp;</span>
</p>
<p>
<span style="color: windowtext;">
&nbsp;</span>
</p>
<p>
<span style="color: windowtext; background-color: inherit;">
ANYWAYS, there IS much more MATH about Farnsworth timing on another page on Morsecode.world. (</span>
<a href="https://morsecode.world/international/timing/farnsworth.html" rel="noopener noreferrer" target="_blank">
https://morsecode.world/international/timing/farnsworth.html</a>
<span style="color: windowtext; background-color: inherit;">
 ).&nbsp;But I don't want to get into all of it in detail here.&nbsp;Not when there is a shortcut we can use in our code.&nbsp;Simplified, we can take 1,200 and divide it by the WPM we desire, and it will give us a close enough approximation of the number of milliseconds long a dit should be.</span>
<span style="color: windowtext;">
&nbsp;</span>
</p>
<p>
<span style="color: windowtext;">
&nbsp;</span>
</p>
<p>
<span style="color: windowtext; background-color: inherit;">
For the 15 WPM messages you have heard throughout this episode, a dit&nbsp;was 1200/15 = 80 ms in length.&nbsp;If I speed it up to 20 WPM (The speed at which I try to practice) a dit will be 1200/20 = 60 ms long.</span>
<span style="color: windowtext;">
&nbsp;</span>
</p>
<p>
<span style="color: windowtext;">
&nbsp;</span>
</p>
<p>
<span style="color: windowtext;">
This will be an important calculation for us as we develop the code we will later be using to construct our messages using the CYD.&nbsp;&nbsp;&nbsp;</span>
</p>
<p>
<span style="color: windowtext;">
&nbsp;</span>
</p>
<p>
<span style="color: windowtext;">
And this is also a good stopping point so that I can get back to trying to build that infernal GUI.&nbsp;</span>
</p>


