<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">\documentclass{article}

% Language setting
% Replace `english' with e.g. `spanish' to change the document language
\usepackage[english]{babel}

% Set page size and margins
% Replace `letterpaper' with `a4paper' for UK/EU standard size
\usepackage[letterpaper,top=2cm,bottom=2cm,left=3cm,right=3cm,marginparwidth=1.75cm]{geometry}

% Useful packages
\usepackage{amsmath}
\usepackage{graphicx}
\usepackage[colorlinks=true, allcolors=blue]{hyperref}
\usepackage{tikz}
\usetikzlibrary{automata, positioning, arrows}

\title{Morse reception state machine}
\author{R.P. Clark}

\begin{document}
\maketitle

\begin{abstract}
Your abstract.
\end{abstract}

\section{Introduction}

State machine for morse rt decoding.
\begin{itemize}
    \item 0: IDLE --- start state
    \item 1: KEY\_DN --- Morse KEY is DOWN
    \item 2: DIT --- Morse DIT element registered
    \item 3: DAH --- Morse DAH element registered
    \item 4: END\_CHAR --- One morse character registered i.e. (A-Z0-9)
    \item 5: SPACE --- One SPACE between characters registered
\end{itemize}
The relationships between these states is shown in figure~\ref{fig:morse_rt_reception},
the time $\tau$ is 50mS for 20 characters per minute Morse code.
\begin{figure}
\centering
\begin{tikzpicture}

\node[state, initial] (q0) at (2,12) {0:IDLE};
\node[state] (q1) at (4,9) {1:KEY\_DN};
\node[state, accepting] at (10,6) (q2) {2:DIT};
\node[state, accepting] at (8,6) (q3) {3:DAH};
\node[state, accepting] at (4,3) (q4) {4:END\_CHAR};
\node[state, accepting] at (2,0) (q5) {5:SPACE};

\draw (q0) edge[-&gt;&gt;,right] node{key down} (q1)
(q1) edge[-&gt;&gt;,right] node{KEY\_UP $\tau \approx 1$} (q2)
(q1) edge[-&gt;&gt;,left] node{KEY\_UP $\tau \approx 3$} (q3)
(q2) edge[-&gt;&gt;,right] node{$\tau \approx 3$} (q4)
(q3) edge[-&gt;&gt;,left] node{$\tau \approx 3$} (q4)
(q4) edge[-&gt;&gt;,left] node{$\tau &gt; 4$} (q5)
(q5) edge[-&gt;&gt;,right, bend left, left=4.3] node{key down} (q1)
(q4) edge[-&gt;&gt;,left, bend left, left=4.3] node{key down} (q1)
;
\end{tikzpicture}
    \caption{State diagram for morse real time reception}
    \label{fig:morse_rt_reception}
\end{figure}


%\bibliographystyle{alpha}
%\bibliography{sample}

\end{document}
</pre></body></html>