|
Contemporary
Design Execution
by Robert P. Bisey
Start ý The
History ý Interfacing ý Interface
Board Circuit Descriptions ý The Microcontroller
Board Program Logic
Software Code Transmission Protocol
Something Old, Something New..
Sources and PDF
PROGRAM LOGIC
Figure 2 shows the general flow of the
program logic that must occur to successfully generate a Morse code
transmission. If the transmit/test push button is not pushed or the
external CODE TRANSMIT signal does not occur, the program follows
the No decision path and loops back endlessly onto itself, waiting
for the push-button/external CODE TRANSMIT signal to occur.
| Figure
2ýFive decision blocks
are used to sequentially read through a text string and selectively
branch to a specific subroutine used to generate a Morse code
element. |
If either of these two events do occur,
the Yes decision path is initiated, which causes the Y-index register
of the 68HC11 to point to the address of the first character in the
Morse code string to be transmitted. This is immediately followed
by a logic signal, which appears at the SBC-2A board, driving the
input of a standby/enable transistor whose logic 0 TRANSMIT ENABLE
output enables the repeater/transmitter to begin transmitting the
code sequence. The instant this enabling signal occurs, a short delay
of approximately 0.5 s elapses to ensure that the repeater/transmitter
has adequate time to fully turn on from Standby/Power down mode and
shift into Transmit mode before the first code element is actually
transmitted.
After this delay, the program flow drops
down to the top of a vertical string of five Yes/No decision diamonds,
which tests for the presence of a specific character in the text string
about to be transmitted. Namely, a hyphen, period, forward slash,
backslash, or the letter X, which corresponds to a dash, dot, character
space, word space, and end of string, respectively, would be found.
For example, if the first character encountered in the text string
is a period, because a dash in the first decision diamond is not a
period, the program "falls through" the first decision diamond
by taking the No path to the input of the second diamond. Because
of the period in the text string of the second diamond, the program
flow takes the Yes branch to execute a subroutine program segment,
generating a Morse code Dot.
After the Dot subroutine has finished
generating a Dot time, the subroutine bypasses the remaining decision
diamonds and returns to the main program flow, initiating a program
segment, which causes the Y-Index register to point to the next code
element to be transmitted. Thus, the process continues so long as
the letter X, the end of string character, is not encountered.
If the letter X is encountered, however,
the program initiates another brief 0.5-s delay via the state change
of the standby/enable transistor, returning the repeater/transmitter
to Standby mode. The program then terminates at the Start node waiting
for the transmit/test push button or external CODE TRANSMIT signal
to occur to retransmit the entire Morse code string all over again.
PREVIOUS
NEXT
Circuit Cellar provides up-to-date information for engineers. Visit
www.circuitcellar.com for
more information and additional articles.
For subscription information, call (860) 875-2199, subscribe@circuitcellar.com
or subscribe online.
ýCircuit Cellar, the Magazine for Computer Applications. Posted with
permission. |