Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Draw a detailed flowchart for Lab 4 assignments (below) that describes how each part of your program should work (your approach to reading characters from

Draw a detailed flowchart for Lab 4 assignments (below) that describes how each part of your program should work (your approach to reading characters from the serial port, getting the correct pattern for each incoming character, and then play the correct Morse code tones). Your flowchart should consist of a series of goals, the decisions involved in reaching each goal, and the actions taken after each decision

Lab #4 Assignment

Write a program that will read a single human readable character from the serial port and send back a string that represents the Morse code pattern for that character.

TA Signature: . Date: ..........//201

Write a function that processes the Morse code pattern by playing the correct tones for each character and also printing the Morse code pattern to the serial port.

TA Signature: . Date: ..........//201

Your program should use these values for the lengths of the various delays youll encounter in this assignment

Type

Duration

Dit (short)

100 milliseconds

Dah (long)

300 milliseconds

Space between dits and dahs

500 milliseconds

Space between letters

300 milliseconds

Space between words

700 milliseconds

TA Signature: . Date: ..........//201

Demonstrate your code using these test strings and compare them to the results produced by this website (http://morsecode.scphillips.com/translator.html)

ABC DEF GHI JKL MNO PQR STU VWX YZ

EGR Morse Code Demo

Morse Code Table (*=dit, _=dah)

Character

Pattern

Character

Pattern

A/a

* _

S/s

* * *

B/b

_ * * *

T/t

_

C/c

_ * _ *

U/u

* * _

D/d

_ * *

V/v

* * * _

E/e

*

W/w

* _ _

F/f

* * _ *

X/x

_ * * _

G/g

_ _ *

Y/y

_ * _ _

H/h

* * * *

Z/z

_ _ * *

I/i

* *

J/j

* _ _ _

K/k

_ * _

L/l

* _ * *

M/m

_ _

N/n

_ *

O/o

_ _ _

P/p

* _ _ *

Q/q

_ _ * _

R/r

* _ *

Capture the transmission of a character over TTL (serial) on an oscilloscope and explain the different parts of the waveform. Explain to the TA how you used the trigger function on the scope to capture the waveform.

Voltage Division: .(v) Time Division: ..(us)

Some notes of how to design your program:

Patterns can be represented as an array of characters like this:

char pattern[26][7] = {"*_",//A,a

"_***",//B,b

.

.

.

etc

In order to save some typing time, weve included the declarations for the pattern array on the next page.

The pattern array first index goes from 0 up to 25 (26 element). For example, pattern[2][]="_*_*", where pattern[2][1]= *.

From the ASCII table on Page 6, you can notice the following:

The characters A,B,C,D,E,,Z have the following decimal representation 65,66,67,68,69,,90. [Increment of 1]

By subtracting 65 from each character (if it was between A and Z), the result is a number between 0 and 25 (26 character), this number can be used as an index for the array (the first index for the array, for the second index use a for loop).

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions