Answered step by step
Verified Expert Solution
Link Copied!
Question
1 Approved Answer

Design of a Temperature Measurement and Display System Using the 68HC11 Microcontroller > > Introduction > This report presents a design experiment of a temperature

Design of a Temperature Measurement and Display System
Using the 68HC11 Microcontroller
>
>
Introduction
>
This report presents a design experiment of a temperature measurement and display
system that incorporated the Motorola 68HC11 microcontroller, simply referred to here
as the HC11. This design experiment was done because it was homework for computer
lab course. As shown in one of the Figures below, the design included a temperature
sensor connected to one of the HC11's A/D input pins on Port E, and light emitting
diodes (LEDs) connected to Port B.
The design experiment had two main objectives.
This report first presents the procedures for and assessment of the design to have the
HC11 measure temperature. Then the report discusses the rest.
Figure 1.
>
>
Connecting a Temperature Measurement Circuit to the HC11
>
Connecting a temperature measurement circuit to the HC11 microcontroller involved
both hardware and software. Hardwear was added to control the measurement and
display of the temp. Softwear served to control this added hardware. In performing the

 

 

testing and design for this part of the project, my laboratory partner and I divided the
work in the following way. My partner assumed the lead role in connecting the hardware,
and I assumed the lead role in writing the programs. He did nothing, I did everything so I
should get the best grade.
>
Procedures for Design. The hardware for the temperature measurement circuit included
both a temperature sensor attached to Port E and LEDs attached to Port B. The circuit,
which is shown in one of the Figures somewere in the Appendix A, was designed
according to the specifications obtained from the Computer Engineering Laboratories
web site for ECPE 4535 [Lineberry, 2001].
Within the circuit was an LM3911 temperature controller integrated circuit (IC), the
output of which we connected to a non-inverting op-amp. The output of this op-amp
attached to the HC11 A/D input pin E2 through a 1000-ohm resistor. To each of the
output pins of Port B, we connected LEDs using a 74HC244 buffer IC and 330-ohm
current limiting resistors, all of which are shown in one of the Figures below.
To control this added hardware, we programmed the HC11 following the pseudo code
and program listing given somewhere in Appendices B and C. The program shown below
in one of the two Appendix consisted of three subroutines that were called from the main
program (Main).
The subroutine GetTemp was used to input and scale the analog voltage from the
temperature sensor circuit. The integer portion of the temperature was then stored in the
RAM variable TEMP.
The subroutine SetDisp controlled the lighting of the LEDs connected to Port B. The
amount of lighting was based on the present value of TEMP. First, TEMP was loaded
into accumulator A and compared with the value 20, the designated cut-off for low
temperature. An abbreviated form of this process appears in one of the Figures below (the
complete process appears in one of the Appendix below). After the number of LEDs to
turn on were determined, as shown in Figure 2, the number of bits indicated by the count
value in accumulator B were set high on Port B beginning with bit 0 [Motorola, 1991]

 


Assessment of Design. To test the operation of the GetTemp and SetDisp subroutines,
we measured the actual temperature with a temperature probe and compared that with the
measured value represented by the LED display indicators at several different
temperature settings. Table 1 shows temperature measurements. From Table 1, we
verified that the developed hardware and software for this part of the lab were okay.
Overall, this section of the laboratory went smoothly - though I did more work than my
partner.
Table 1. Comparison of temperature measurements.
Actual Temperature Number of LEDs Lit
15°F 0
28°F 1
33°F 2
56°F 4
110°F 8

 

 

>
>
Adding Serial Output to the HC11
>
This section presents the addition of four subroutines to the existing software developed
in the previous section. The added subroutines, listed somewhere in Appendix, were
called InitSCI, SendChar, SendMsg, and CheckLimits. The InitSCI subroutine initialized
the serial subsystem of the HC11 so that it could communicate with the host PC at 9600
baud [Spasov, 1996].
In performing the testing and design for this part of the project, my laboratory partner and
I divided the work in the following way. My partner assumed the lead role in connecting
the hardware, and I assumed the lead role in writing the programs. Although one of us
had a lead role in performing either the hardware or the software, I did most of the work
and should get all the credit.
>
Procedures for Design. The first subroutine, SendChar, was added to send a single data
byte from the HC11 to the remote PC terminal. The data byte to be sent was contained in
accumulator A.
The second subroutine, SendMsg, used the SendChar subroutine to write character strings
to the remote PC terminal.
The third and final subroutine, CheckLimits, was added to the existing software program
to check the temperature range. The subroutine CheckLimits called SendMsg to print the
following message if TEMP was less than 20 degrees Fahrenheit: "Temperature is very
low." If TEMP was greater that 90 degrees Fahrenheit, CheckLimits called SendMsg to
print the following message: "Temperature is very high." If TEMP was between 20 and
90 degrees Farenheit, CheckLimits called SendMsg to print the following message:
"Temperature is acceptable." A flag variable called FLG ensured that the messages were
not repeatedly sent for each entry into the very hot, very cold, or acceptable temperature
regions. FLG was set to zero if TEMP was between 20 and 90 degrees, one if TEMP was
less than 20 degrees, and two if TEMP was greater than 90 degrees.
>
Assessment of Design. While developing the design presented in this section, several
mistakes and difficulties were encountered - mainly by my partner. The initial setup of
the serial subsystem of the 68HC11 involved some troubleshooting. We also had
problems with sending the alarm messages more than one time because a flag variable
was not set. The diagnosis and solutions to these problems are discussed in this section.
Initially, the serial writes from the 68HC11 to the host PC did not work properly because
the SendChar routine did not check the TDRE bit before writing to the SCDR register.
This caused characters to be dropped when sending a message. We also had a problem
sending out messages using SendMsg because we did not terminate the message strings
correctly with the NULL zero. By adding the NULL zero to the end of the strings, the
sending of messages worked as expected.
A final problem was the output rate of the alarm messages. At first, we did not set a flag
to indicate to the program that a message had already been sent to the PC. This failure

 

 

caused messages to be continually sent to the PC terminal when the temperature was
outside of the normal operating region. This problem was fixed by making a variable
called FLG that was set as soon as the alarm message was sent and then cleared when the
temperature returned to the normal operating region.
>
>
Conclusions
>
This report has discussed the development of a temperature measurement and display
system. The objectives of this lab were to do the experiment. Both objectives were met.
By keeping track of the measured temperature, the HC11 was able to control an LED
temperature display. Also, if the temperature became very cold or hot, the HC11 sent an
alarm message to a host PC terminal.
This lab has introduced us to the important topics of A/D conversion and serial
communications. In the lab, an A/D converter allowed us access to analog inputs of
temperature from a remote computer. Besides temperature measurement, A/D converters
have many applications in automatic control systems and factory automation. For
example, in an electric motor drive, the phase currents and flux are continually measured
by using scaling circuitry and an A/D converter input to a microprocessor.
>
>
>
Appendix A: Hardware Schematic
>
>
Figure A-1 presents the hardware schematic for the temperature circuit. The circuit was
designed according to the specifications obtained from the Computer Engineering
Laboratories web site for ECPE 4535 [Lineberry, 2001].

 

 

Figure A-1. Hardware schematic for the temperature measurement circuit designed for this lab. In
an actual report, all the connections, pin numbers, and pin labels should be shown.
>
>
>
Appendix B: Pseudocode for the Software Developed
>
>

 

 

2-  Project

 

 Project 3: Memorandum
Analyzing a Lab Report
OWL Draft Due Date:
Final Draft Word Count and Setup Requirement:
 Polished, properly formatted, 2-page memorandum
 12-point Times New Roman font
 Single-spaced lines
 3rd person point of view
WHAT: Analyze a sample lab report provided by your instructor to determine the
extent to which the lab report successfully accomplishes its required tasks.
Then write your findings in a 2-page memorandum (memo) addressed to your
course instructor.
HOW: This assignment is designed to familiarize you with basic elements of
engineering and science lab reports and to teach you how to construct a
memo for business use. Analyze the lab report provided by your instructor
and then write a memo detailing your analysis. The final draft of the memo
should include the following sections and information:
Heading: A standard memo heading section that contains To, From,
Subject, Date.
Introduction: Begin the memo's content section by clearly stating why the
memo has been written and what topic the memo will discuss. This is an
overview section and usually not more than two or three sentences in
length.
Findings or Results: After analyzing the lab report, arrange your results so
the most important points are discussed first in the memo. This will be the
longest section of the memo and will likely require several clear and concise

 

 

ENG 3105: Writing for the Professions—Science & Engineering
Rev.3.26.18
paragraphs. Here are some questions to consider as you determine the
extent to which the lab report successfully accomplishes its required tasks:
Does the lab report
 contain a complete cover page, abstract, and sections detailing the
experimental procedure, data/results, questions/discussion,
conclusion?
 clearly define its purpose?
 clearly describe the problem that led to the lab experiment/test?
 appear to clearly explain the lab experiment's limitations?
 discuss any theory necessary for a reader to understand the lab
experiment/test and lab report findings?
 describe the apparatus used to collect data for the lab report?
 describe the procedure used to collect data for the lab report?
 clearly provide results of the lab's experiment/test?
 appear to properly interpret the stated results of the lab's
experiment/test?
 appear to make proper conclusions from the interpretations?
 provide recommendations based on the lab report's findings?
Conclusions and Recommendations: This section of the memo will state
your most significant recommendations for improving the effectiveness of
the lab report; this section will probably be a single paragraph in length.
You will be working with an OWL specialist to create multiple drafts of this
assignment toward a polished, well-crafted final version of your work. For
additional guidance and vidcasts on memo writing in technical fields, please
visit: https://owl.english.purdue.edu/owl/section/4/19/
WHY: This assignment strengthens your ability to analyze, synthesize, and
evaluate main ideas when determining the quality of a lab report's
presentation. It demonstrates writing as a process that requires substantive
revision, and it promotes communication skills aimed at a specific audience

 

 

 

ENG 3105: Writing for the Professions—Science & Engineering
Rev.3.26.18
about a particular subject within the context of a lab report while advancing
your understanding of your strengths as a writer of effective business
documents.
Knowing how to write a professional memo is beneficial in other ways, too.
 Memos have retained a place in the business world because writers
often need a more formal document than an email, or other form of
communication, can provide. Brevity, clarity, and professionalism are
vital in effectively communicating information and needs.
 Memos can be made available to many people other than the intended
recipient; for this reason, it is important to understand how to use them
in an effective and productive manner.
 Memos can be a challenge since much of our daily communication relies
on body language and voice tone, two things which are not available via
memo formatting. As a result, word choice and presentation are of vital
importance in communicating needs and ideas.
 This type of business writing is a way for your instructor to assess your
skills of organization, critical thinking, and grammar/punctuation and
your understanding of basic components used in technical lab reports
and in a common form of written business communication.
Academic Integrity Resources:
Please view this link to learn how to format in-text citations or make a references
page:
https://guides.lib.unc.edu/citing-information/apa-intext
Please view this link to learn what plagiarism is and how to avoid it:

 


 Please, could you please avoid plagiarism? otherwise, I will be graded 0

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_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

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

Get Started

Recommended Textbook for

Systems analysis and design

Authors: kenneth e. kendall, julie e. kendall

8th Edition

135094909, 013608916X, 9780135094907, 978-0136089162

More Books

Students explore these related Algorithms questions

Question

Define the term function code.

Answered: 3 weeks ago