Monash Uni Example Lab Report and Structure

Embed Size (px)

Citation preview

  • 7/29/2019 Monash Uni Example Lab Report and Structure

    1/22

    Example Lab Report and structure

    Monash Uni

    The lab report

    The laboratory report is an important form of writing for scientists as it provides a record of experiments completed. Dependingon the type of task or investigation you carry out, the sections of the written piece may vary, but a lab report or project reportwill usually have a title page, abstract, introduction and methods, results, discussion sections, a conclusion and references testsection.

    Section Description

    Title page + ID details displays your name and student ID number

    the title gives a precise description of what is in the report(this may be supplied by the lecturer).

    Abstract placed at the beginning of the report

    provides a summary of the entire paper (about 5% of the whole text) including:

    o the problem and its importanceo what was done (the experiment)

    o how it was done (the method)o what resulted (the most important results)o what this research contributes to the field (significance)

    NB: The abstract does not include figures or tables.

    Introduction gives the background or scope of study

    includes background information so that the reader1. understands the question behind the research

    2. how it relates to other work in the field, and

    3. why it is worth investigating.

    Methods describes the methods and procedures used

    clearly explains the methodology so that it could be replicated (repeated) by anotherresearcher.

    Results presents the results of the experiment

    uses an equation editor with correct mathematical symbols if the results involvenumbers and equations

    includes clearly labelled figures, tables and graphs where appropriate.

    Discussion analyses and interprets the results, showing how these relate to the scope of study

    states conclusions about how the results confirm, verify, or support the hypothesis, orrefute, negate, or contradict it.

    NB: The word "prove" is not used except in very specific contexts (eg in mathematics).

    Conclusion summarises the conclusions of the study.

    References lists all references cited in the text.

    Laboratory Reports

    http://www.writing.eng.vt.edu/workbooks/design.htmlhttp://www.writing.eng.vt.edu/workbooks/reports.htmlhttp://www.writing.eng.vt.edu/workbooks/design.htmlhttp://www.writing.eng.vt.edu/workbooks/reports.html
  • 7/29/2019 Monash Uni Example Lab Report and Structure

    2/22

    Sample Reports:

    Virginia Tech (1)Virginia Tech (2)Virginia Tech (3)

    Lab Report Links:TorontoWisconsin

    Site Links:

    Writing GuidelinesWriting Exercises

    Laboratory reports are written for several reasons. One

    reason is to communicate the laboratory work tomanagement. In such situations, management often basescompany decisions on the results of the report. Anotherreason to write laboratory reports is to archive the work sothat the work will not have to be done in the future. Thisweb page presents a commonly used organization forlaboratory reports:

    Abstract,Introduction,Procedures,Results and Discussion,Conclusions,andAppendices.You should not assume, though, that thisorganization will serve all your laboratory reports.In other words, one organization does not "fit" allexperiments. Rather, you should pay attention to theorganization requested by your instructor who haschosen an organization that best serves yourexperiments.

    Abstract

    The abstract presents a synopsis of the experiment. The followingguidelines for preparing an abstract arise from the American Institute ofAeronautics and Astronautics (AIAA). Note that although your instructormay define the term "abstract" differently, these guidelines still give you a

    sense of the stylistic issues, such as whether to include numerical data, thatdistinguish abstracts:

    The abstract should be written concisely in normal rather than highly abbreviatedEnglish. The author should assume that the reader has some knowledge of thesubject but has not read the paper. Thus, the abstract should be intelligible andcomplete in itself; particularly it should not cite figures, tables, or sections of the

    paper. The opening sentence or two should, in general, indicate the subjects dealtwith in the paper and should state the objectives of the investigation. It is alsodesirable to describe the treatment by one or more such terms as brief, exhaustive,theoretical, experimental, and so forth.The body of the abstract should indicate newly observed facts and the conclusionsof the experiment or argument discussed in the paper. It should contain new

    numerical data presented in the paper if space permits; otherwise, attention shouldbe drawn to the nature of such data. In the case of experimental results, theabstract should indicate the methods used in obtaining them; for new methods the

    http://www.writing.eng.vt.edu/me4006/sample1.pdfhttp://www.writing.eng.vt.edu/me4006/sample1.pdfhttp://www.writing.eng.vt.edu/workbooks/labreport2.htmlhttp://www.writing.eng.vt.edu/workbooks/labreport2.htmlhttp://www.writing.eng.vt.edu/workbooks/labreport.htmlhttp://www.writing.eng.vt.edu/workbooks/labreport.htmlhttp://www.ecf.utoronto.ca/~writing/handbook-lab.htmlhttp://www.wisc.edu/writing/Handbook/ScienceReport.htmlhttp://www.wisc.edu/writing/Handbook/ScienceReport.htmlhttp://www.writing.eng.vt.edu/index.htmlhttp://www.writing.eng.vt.edu/index.htmlhttp://www.writing.eng.vt.edu/exercises/index.htmlhttp://www.writing.eng.vt.edu/exercises/index.htmlhttp://www.writing.eng.vt.edu/workbooks/laboratory.html#abstractshttp://www.writing.eng.vt.edu/workbooks/laboratory.html#abstractshttp://www.writing.eng.vt.edu/workbooks/laboratory.html#introductionhttp://www.writing.eng.vt.edu/workbooks/laboratory.html#introductionhttp://www.writing.eng.vt.edu/workbooks/laboratory.html#procedureshttp://www.writing.eng.vt.edu/workbooks/laboratory.html#procedureshttp://www.writing.eng.vt.edu/workbooks/laboratory.html#resultshttp://www.writing.eng.vt.edu/workbooks/laboratory.html#resultshttp://www.writing.eng.vt.edu/workbooks/laboratory.html#conclusionshttp://www.writing.eng.vt.edu/workbooks/laboratory.html#conclusionshttp://www.writing.eng.vt.edu/workbooks/laboratory.html#appendiceshttp://www.writing.eng.vt.edu/workbooks/laboratory.html#appendiceshttp://www.writing.eng.vt.edu/workbooks/laboratory.html#appendiceshttp://www.writing.eng.vt.edu/workbooks/laboratory.html#conclusionshttp://www.writing.eng.vt.edu/workbooks/laboratory.html#resultshttp://www.writing.eng.vt.edu/workbooks/laboratory.html#procedureshttp://www.writing.eng.vt.edu/workbooks/laboratory.html#introductionhttp://www.writing.eng.vt.edu/workbooks/laboratory.html#abstractshttp://www.writing.eng.vt.edu/exercises/index.htmlhttp://www.writing.eng.vt.edu/index.htmlhttp://www.wisc.edu/writing/Handbook/ScienceReport.htmlhttp://www.ecf.utoronto.ca/~writing/handbook-lab.htmlhttp://www.writing.eng.vt.edu/workbooks/labreport.htmlhttp://www.writing.eng.vt.edu/workbooks/labreport2.htmlhttp://www.writing.eng.vt.edu/me4006/sample1.pdf
  • 7/29/2019 Monash Uni Example Lab Report and Structure

    3/22

    basic principle, range of operation, and degree of accuracy should be given. Theabstract should be typed as one paragraph. Its optimum length will varysomewhat with the nature and extent of the paper, but it should not exceed 200words.

    Included here isa sample abstractfor a laboratory report. Note that because

    this abstract serves a long report rather than a journal article, the abstract issomewhat longer than 200 words recommended by the AIAA.

    Introduction

    The "Introduction" of a laboratory report identifies the experiment to beundertaken, the objectives of the experiment, the importance of theexperiment, and overall background for understanding the experiment. Theobjectives of the experiment are important to state because these objectives

    are usually analyzed in the conclusion to determine whether the experimentsucceeded. The background often includes theoretical predictions for whatthe results should be. (See asample "Introduction.")

    Procedures

    The "Procedures," often called the "Methods," discusses how theexperiment occurred. Documenting the procedures of your laboratoryexperiment is important not only so that others can repeat your results but

    also so that you can replicate the work later, if the need arises. Historically,laboratory procedures have been written as first-person narratives asopposed to second-person sets of instructions. Because your audienceexpects you to write the procedures as a narrative, you should do so.Achieving a proper depth in laboratory procedures is challenging. Ingeneral, you should give the audience enough information that they couldreplicate your results. For that reason, you should include those details thataffect the outcome. Consider as an example the procedure for using amanometer and strain indicator to find the static calibration of a pressuretransducer. Because calibrations are considered standard, you can assumethat your audience will have access to many details such as possiblearrangements of the valves and tubes. What you would want to include,then, would be those details that might cause your results to differ fromthose of your audience. Such details would include the model number ofthe pressure transducer and the pressure range for which you calibrated thetransducer. Should you have any anomalies, such as unusual ambienttemperature, during your measurements, you would want to include those.When the procedure is not standard, the audience would expect more detailincluding theoretical justification for the steps. Given below is such a

    procedure--this one for an experiment devised to determine whether thefrictional torque associated with a multi-turn film potentiometer is strictly

    the Coulomb friction between the slider and the film [Counts, 1999].The test performed on the potentiometer was accomplished by

    http://www.writing.eng.vt.edu/workbooks/sampleabstract.htmlhttp://www.writing.eng.vt.edu/workbooks/sampleabstract.htmlhttp://www.writing.eng.vt.edu/workbooks/sampleabstract.htmlhttp://www.writing.eng.vt.edu/workbooks/labreport.html#introductionhttp://www.writing.eng.vt.edu/workbooks/labreport.html#introductionhttp://www.writing.eng.vt.edu/workbooks/labreport.html#introductionhttp://www.writing.eng.vt.edu/workbooks/labreport.html#introductionhttp://www.writing.eng.vt.edu/workbooks/sampleabstract.html
  • 7/29/2019 Monash Uni Example Lab Report and Structure

    4/22

    winding a string around the potentiometer shaft, attaching a mass tothe string, and letting the mass fall. The change in resistance of the

    potentiometer with time indicated the acceleration of the mass. Inthis experiment it was assumed that the constant Coulomb frictiontorque was the only friction affecting the potentiometer. If this

    assumption were true, the friction force from the torque would beFf= T/r (where Tis the torque and ris the radius of the

    potentiometer's shaft). Likewise, the gravity force would be Fg = mg(where m is the mass tied to the string andgis the gravitationalacceleration). A force balance then gives

    T = mr (g-a),

    where a is the acceleration of the mass. If the assumption holds thatthe only friction affecting the potentiometer was constant Coulombfriction, then each mass would undergo a constant acceleration.

    The potentiometer measured voltage versus time for the masses asthey dropped, but the measurement of interest to us was positionversus time. For that reason, a 'calibration' was performed before wemeasured any data. In the calibration, the potentiometer's initialvoltage was measured. Then the string was pulled a set distance (2inches), and the voltage was recorded. This process of pulling thestring a set distance and recording the voltage continued anothertwo times (see Appendix A for the results). To determine therelationship between voltage and position, the differences in thevoltages were averaged and divided by the length. The resultingrelationship was 0.9661 volts/inch.Five different masses were used to test the assumption of constantacceleration. For each mass, the string was rolled up on the shaft,the oscilloscope was triggered, and the shaft was released. As eachmass dropped, the oscilloscope collected the potentiometer's voltageversus the time. After obtaining plots for each mass, we used thevoltage-position relationship, mentioned above, to convert the datafrom the form voltage versus time to the form position versus timesquared.The residuals of the data determined whether theassumption of constant acceleration was valid.

    Results and Discussion

    The heart of a laboratory report is the presentation of the results and thediscussion of those results. In some formats, "Results" and "Discussion"appear as separate sections. However, P.B. Medawar [1979] makes a strongcase that the two should appear together, particularly when you have manyresults to present (otherwise, the audience is faced with a "dump" ofinformation that is impossible to synthesize). Much here depends upon yourexperiment and the purpose of your laboratory report. Therefore, pay

    attention to what your laboratory instructor requests. Also, use yourjudgment. For instance, combine these sections when the discussion of your

  • 7/29/2019 Monash Uni Example Lab Report and Structure

    5/22

    first result is needed to understand your second result, but separate thesesections when it is useful to discuss the results as a whole after all resultsare reported.In discussing the results, you should not only analyze the results, but alsodiscuss the implications of those results. Moreover, pay attention to the

    errors that existed in the experiment, both where they originated and whattheir significance is for interpreting the the reliability of conclusions. Oneimportant way to present numerical results is to show them in graphs. (Seeasample "Results and Discussion" section.)

    Conclusions

    In longer laboratory reports, a "Conclusion" section often appears. Whereasthe "Results and Discussion" section has discussed the results individually,

    the "Conclusion" section discusses the results in the context of the entireexperiment. Usually, the objectives mentioned in the "Introduction" areexamined to determined whether the experiment succeeded. If theobjectives were not met, you should analyze why the results were not as

    predicted. Note that in shorter reports or in reports where "Discussion" is aseparate section from "Results," you often do not have a "Conclusion"section. (See asample "Conclusions" section.)

    Appendices

    In a laboratory report, appendices often are included. One type of appendixthat appears in laboratory reports presents information that is too detailed to

    be placed into the report's text. For example, if you had a long table givingvoltage-current measurements for an RLC circuit, you might place thistabular information in an appendix and include a graph of the data in thereport's text. Another type of appendix that often appears in laboratoryreports presents tangential information that does not directly concern theexperiment's objectives.If the appendix is "formal," it should contain a beginning, middle, and

    ending. For example, if the appendix contains tables of test data, theappendix should not only contain the tabular data, but also formallyintroduce those tables, discuss why they have been included, and explainthe unusual aspects that might confuse the reader. Because of timeconstraints, your instructor might allow you to include "informal"appendices with calculations and supplemental information. For such"informal" situations, having a clear beginning, middle, and ending is notnecessary. However, you should still title the appendix, place a heading oneach table, place a caption beneath each figure, and insert commentsnecessary for reader understanding. (See asample appendix.)

    http://www.writing.eng.vt.edu/workbooks/labreport2.html#resultshttp://www.writing.eng.vt.edu/workbooks/labreport2.html#resultshttp://www.writing.eng.vt.edu/workbooks/labreport2.html#resultshttp://www.writing.eng.vt.edu/workbooks/labreport.html#conclusionshttp://www.writing.eng.vt.edu/workbooks/labreport.html#conclusionshttp://www.writing.eng.vt.edu/workbooks/labreport.html#conclusionshttp://www.writing.eng.vt.edu/workbooks/labreport.html#appendiceshttp://www.writing.eng.vt.edu/workbooks/labreport.html#appendiceshttp://www.writing.eng.vt.edu/workbooks/labreport.html#appendiceshttp://www.writing.eng.vt.edu/workbooks/labreport.html#appendiceshttp://www.writing.eng.vt.edu/workbooks/labreport.html#conclusionshttp://www.writing.eng.vt.edu/workbooks/labreport2.html#results
  • 7/29/2019 Monash Uni Example Lab Report and Structure

    6/22

    Last updated 07/04http://writing.eng.vt.edu/

    http://www.writing.eng.vt.edu/workbooks/laboratory.html

    Sample Laboratory Report #1

    Supporting Links:Lab ReportsSample Lab Report #2

    Site Links:

    Writing GuidelinesWriting Exercises

    This web page presents a sample report [Herwald, 1999]written in a microprocessor laboratory course at VirginiaTech. In this report, carets (>) are given to reveal the linespacings in the report's format (in an actual report, thesecarets would not appear). Also, in this report, the actualappendices are not complete (in an actual report, theseappendices would be complete, and each would begin on a

    separate page). Moreover, an aspect of format that isprobably not reflected by your browser is that the report'stitle and appendices' titles are in 14-point type, thesubheadings and text are in 12-point type, and the figurecaptions are in 10-point type.

    Note that instructors of other laboratory courses may havedifferent expectations as far as the format and style of labreports in their classes. For instance, the guidelines formany laboratory reports call foran abstractto appear in thereport's beginning. Moreover, some instructors frown on

    the use of the first person (Iorwe).

    >>>

    Design of a Temperature Measurement and Display System

    Using the 68HC11 Microcontroller

    >

    http://www.writing.eng.vt.edu/workbooks/laboratory.htmlhttp://www.writing.eng.vt.edu/workbooks/laboratory.htmlhttp://www.writing.eng.vt.edu/workbooks/laboratory.htmlhttp://www.writing.eng.vt.edu/workbooks/laboratory.htmlhttp://www.writing.eng.vt.edu/workbooks/labreport2.htmlhttp://www.writing.eng.vt.edu/workbooks/labreport2.htmlhttp://www.writing.eng.vt.edu/index.htmlhttp://www.writing.eng.vt.edu/index.htmlhttp://www.writing.eng.vt.edu/exercises/index.htmlhttp://www.writing.eng.vt.edu/exercises/index.htmlhttp://www.writing.eng.vt.edu/workbooks/sampleabstract.htmlhttp://www.writing.eng.vt.edu/workbooks/sampleabstract.htmlhttp://www.writing.eng.vt.edu/workbooks/sampleabstract.htmlhttp://www.writing.eng.vt.edu/workbooks/laboratory.htmlhttp://www.writing.eng.vt.edu/workbooks/design.htmlhttp://www.writing.eng.vt.edu/workbooks/reports.htmlhttp://www.writing.eng.vt.edu/workbooks/laboratory.htmlhttp://www.writing.eng.vt.edu/workbooks/design.htmlhttp://www.writing.eng.vt.edu/workbooks/reports.htmlhttp://www.writing.eng.vt.edu/workbooks/laboratory.htmlhttp://www.writing.eng.vt.edu/workbooks/design.htmlhttp://www.writing.eng.vt.edu/workbooks/reports.htmlhttp://www.writing.eng.vt.edu/workbooks/laboratory.htmlhttp://www.writing.eng.vt.edu/workbooks/design.htmlhttp://www.writing.eng.vt.edu/workbooks/reports.htmlhttp://www.writing.eng.vt.edu/workbooks/laboratory.htmlhttp://www.writing.eng.vt.edu/workbooks/design.htmlhttp://www.writing.eng.vt.edu/workbooks/reports.htmlhttp://www.writing.eng.vt.edu/workbooks/sampleabstract.htmlhttp://www.writing.eng.vt.edu/exercises/index.htmlhttp://www.writing.eng.vt.edu/index.htmlhttp://www.writing.eng.vt.edu/workbooks/labreport2.htmlhttp://www.writing.eng.vt.edu/workbooks/laboratory.htmlhttp://www.writing.eng.vt.edu/workbooks/laboratory.html
  • 7/29/2019 Monash Uni Example Lab Report and Structure

    7/22

    >

    Introduction>

    This report presents a design of a temperature measurement and display systemthat incorporated the Motorola 68HC11 microcontroller, simply referred to here as

    the HC11. This design was a valuable experience because similar temperaturemeasurement and display systems often are used in buildings and vehicles [Spasov,1996]. The design presented in this report made use of the HC11's analog-to-digital(A/D) converter and the serial subsystems. As shown in Figure 1, the designincluded a temperature sensor connected to one of the HC11's A/D input pins onPort E, and light emitting diodes (LEDs) connected to Port B. These LEDs acted astemperature indicators. Additionally, the design included a connection between theHC11 and a remote personal computer (PC). This connection served to sendmessages regarding temperature to the PC. An assembly software programdeveloped for this design performed various functions for using the addedhardware.

    The design had two main objectives. The first objective was to use the HC11 tomeasure temperature. Included in this objective was the task of connecting thetemperature sensor and the LEDs to the HC11. Also included in this objective wasthe task of designing software to do the following: initialize the A/D converter andserial subsystems; control the measurement and storage of temperature in a RAMvariable called TEMP; and control the display of temperature on the LED outputs.The second objective of the design was to use the HC11 to indicate if thetemperature went outside of prescribed limits: below 20 degrees Fahrenheit orabove 90 degrees Fahrenheit. Included in this objective was the task of connectingthe HC11 to a remote PC terminal through an RS-232 connection. Another taskwithin this objective was developing software to initialize the serial subsystem.The final task of this objective was to create subroutines for the software programof the first objective to have the HC11 send a message to the PC if the measuredtemperature went outside the stated limits.This report first presents the procedures for and assessment of the design to havethe HC11 measure temperature. Then the report discusses the procedures for andassessment of adding a serial output to the HC11 design to communicate whetherthe temperature is outside of prescribed limits.

  • 7/29/2019 Monash Uni Example Lab Report and Structure

    8/22

    Figure 1. Temperature measurement and display system developed for the Motorolla68HC11 microcontroller, which is attached to a universal evaluation board (EVBU).

    >>Connecting a Temperature Measurement Circuit to the HC11 >Connecting a temperature measurement circuit to the HC11 microcontrollerinvolved both hardware and software. Hardware was added to control themeasurement and display of the temperature. Software served to control this addedhardware. In performing the testing and design for this part of the project, mylaboratory partner and I divided the work in the following way. My partnerassumed the lead role in connecting the hardware, and I assumed the lead role inwriting the programs. Although one of us had a lead role in performing either thehardware or the software, we worked collaboratively in checking both thehardware and software and in troubleshooting any problems.>Procedures for Design. The hardware for the temperature measurement circuitincluded both a temperature sensor attached to Port E and LEDs attached to Port B.The circuit, which is shown in Figure A-1 of Appendix A, was designed according

    to the specifications obtained from the Computer Engineering Laboratories website 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 thisop-amp attached to the HC11 A/D input pin E2 through a 1000-ohm resistor. Thecircuitry was scaled so that 0 volts out corresponded to 0 degrees and 5 volts outcorresponded to 110 degrees. To each of the output pins of Port B, we connectedLEDs using a 74HC244 buffer IC and 330-ohm current limiting resistors, all ofwhich are shown in Figure A-1. The LEDs were located in the breadboard area ofthe trainer kits.To control this added hardware, we programmed the HC11 following the pseudo

    code and program listing given in Appendices B and C, respectively. The programshown in Appendix C consisted of three subroutines that were called from the main

  • 7/29/2019 Monash Uni Example Lab Report and Structure

    9/22

    program (Main). The three subroutines were named Startup, GetTemp, andSetDisp. The Startup subroutine was used to enable the A/D converter subsystem.First the A/D charge pump was powered up by setting bit 7 of the Option register.Then, bit 6 was cleared so that the charge pump used the system E-clock [Spasov,1996]. After a 100 microsecond delay to allow the charge pump to stabilize, the

    control word $22 was written to the ADCTL register to start continuous, single-scan conversions on pin E2 of Port E.The subroutine GetTemp was used to input and scale the analog voltage from thetemperature sensor circuit. The register ADR3 held the result of the A/Dconversions, which was treated as an 8-bit binary fraction between 0 and 1. Thisvalue was loaded into accumulator A and then multiplied by a scale factor of 110using the MUL instruction. The result of this multiplication was a 16-bit number

    between 0 and 110, with an 8-bit integer portion stored in accumulator A and an 8-bit fractional portion stored in accumulator B. The integer portion of thetemperature 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 wasloaded into accumulator A and compared with the value 20, the designated cut-offfor low temperature. Accumulator B was cleared to zero and represented the initialvalue to be written to Port B. If the value in accumulator A was greater than orequal to 20, then the value in accumulator B was shifted one position left andincremented, and 10 was subtracted from accumulator A. The process thenrepeated itself as long as the value in accumulator A was greater than or equal to20. An abbreviated form of this process appears in Figure 2 (the complete processappears in Appendix C). After the number of LEDs to turn on were determined, asshown in Figure 2, the number of bits indicated by the count value in accumulatorB were set high on Port B beginning with bit 0 [Motorola, 1991].

    Figure 2. Flowchart illustrating the determination of the number of Port B bits to enablefor the LED display.

    >>Assessment of Design. To test the operation of the GetTemp and SetDisp

    subroutines, we measured the actual temperature with a temperature probe andcompared that with the measured value represented by the LED display indicators

  • 7/29/2019 Monash Uni Example Lab Report and Structure

    10/22

    at several different temperature settings. Table 1 shows the results of themeasurement comparison, where the actual temperatures measured are shown onthe left, and the temperatures represented by the number of LEDs lit are shown onthe right. From Table 1, we verified that the developed hardware and software forthis part of the lab were functioning properly. Overall, this section of the laboratory

    went smoothly.

    Table 1. Comparison of temperature measurements.

    Actual Temperature Number of LEDs Lit

    15F 0

    28F 1

    33F 2

    56F 4110F 8

    >>Adding Serial Output to the HC11>

    This section presents the addition of four subroutines to the existing softwaredeveloped in the previous section. The added subroutines, listed in Appendix D,

    were called InitSCI, SendChar, SendMsg, and CheckLimits. The InitSCIsubroutine initialized the serial subsystem of the HC11 so that it couldcommunicate with the host PC at 9600 baud [Spasov, 1996]. This initialization wasdone by writing control words to the BAUD, SCCR1, and SCCR2 control registersin the HC11 as shown in Appendix C.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 leadrole 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 orthe software, we worked collaboratively in checking both the hardware andsoftware and in troubleshooting any problems.

    >Procedures for Design. The first subroutine, SendChar, was added to send asingle data byte from the HC11 to the remote PC terminal. The data byte to be sentwas contained in accumulator A. After waiting for the TDRE bit in the SCSRregister to be set, indicating that the HC11 is ready to transmit another byte, thevalue in accumulator A was written to the SCDR register to begin the transmission[Motorola, 1991].The second subroutine, SendMsg, used the SendChar subroutine to write characterstrings to the remote PC terminal. Before calling SendMsg, the X index registerwas set to point to the beginning of the character string to be sent. The SendMsgsubroutine then sent out the string by calling SendChar for each character until the

    NULL character was reached, which marked the end of a string.The third and final subroutine, CheckLimits, was added to the existing software

  • 7/29/2019 Monash Uni Example Lab Report and Structure

    11/22

    program to check the temperature range. The subroutine CheckLimits calledSendMsg to print the following message if TEMP was less than 20 degreesFahrenheit: "Temperature is very low." If TEMP was greater that 90 degreesFahrenheit, 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 isacceptable." A flag variable called FLG ensured that the messages were notrepeatedly sent for each entry into the very hot, very cold, or acceptabletemperature 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 90degrees.>Assessment of Design. While developing the design presented in this section,several mistakes and difficulties were encountered. The initial setup of the serialsubsystem of the 68HC11 involved some troubleshooting. We also had problemswith 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 theSCDR register. This caused characters to be dropped when sending a message. Wealso had a problem sending out messages using SendMsg because we did notterminate the message strings correctly with the NULL zero. By adding the NULLzero 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 seta 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 thetemperature was outside of the normal operating region. This problem was fixed bymaking a variable called FLG that was set as soon as the alarm message was sentand then cleared when the temperature returned to the normal operating region.>>

    Conclusions>This report has discussed the development of a temperature measurement anddisplay system. The objectives of this lab were to develop the necessary hardwareand software to have the HC11 measure temperature and indicate whether thattemperature fell outside of prescribed limits. Both objectives were met. By keeping

    track of the measured temperature, the HC11 was able to control an LEDtemperature display. Also, if the temperature became very cold or hot, the HC11sent an alarm message to a host PC terminal.This lab has introduced us to the important topics of A/D conversion and serialcommunications. In the lab, an A/D converter allowed us access to analog inputs oftemperature from a remote computer. Besides temperature measurement, A/Dconverters have many applications in automatic control systems and factoryautomation. For example, in an electric motor drive, the phase currents and flux arecontinually measured by using scaling circuitry and an A/D converter input to amicroprocessor.

    >

  • 7/29/2019 Monash Uni Example Lab Report and Structure

    12/22

    >>

    Appendix A: Hardware Schematic>>

    Figure A-1 presents the hardware schematic for the temperature circuit. The circuitwas designed according to the specifications obtained from the ComputerEngineering Laboratories web site for ECPE 4535 [Lineberry, 2001].

    Figure A-1. Hardware schematic for the temperature measurement circuit designed forthis lab. In an actual report, all the connections, pin numbers, and pin labels should beshown.

    >>>

    Appendix B: Pseudocode for the Software Developed>>XXXXXXXXXXXXXXXXXX*

    XXXXXXXXXXXXXXXXXXX

  • 7/29/2019 Monash Uni Example Lab Report and Structure

    13/22

    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    *In an actual report, the pseudocode would appear here. Also note that some professors allow youto substitutean appendix with program flow charts for this appendix.

    >>>

    Appendix C: Program Listing>>

    Assembler release TER_2.0 version 2.09(c) Motorola (free ware)0001;**************************************************0002 ; Temp_Monitor: This program implements atemperature

    0003 ; measurement and display system. The A/Dsystem is0004 ; used to read an analog temperature. Thevalue is0005 ; scaled to Farenheit, and displayed on an LEDbar0006 ; display. If the temperature is above 90 orbelow0007 ; 20, a message is transmitted over the seriallink.0008 ; Programmer: JMB0009;*************************************************

    00100011 ; Define some I/O registers0012 1004 PORTB EQU $10040013 102b BAUD EQU $102B0014 102c SCCR1 EQU $102C0015 102d SCCR2 EQU $102D0016 102e SCSR EQU $102E0017 102f SCDR EQU $102F0018 1030 ADCTL EQU $10300019 1031 ADR1 EQU $10310020 1032 ADR2 EQU $10320021 1033 ADR3 EQU $10330022 1034 ADR4 EQU $1034

    0023 1039 OPTION EQU $103900240025 ; Define some constants

    http://www.writing.eng.vt.edu/workbooks/appendixb.htmlhttp://www.writing.eng.vt.edu/workbooks/appendixb.htmlhttp://www.writing.eng.vt.edu/workbooks/appendixb.html
  • 7/29/2019 Monash Uni Example Lab Report and Structure

    14/22

    0026 005a UPPER_LIMIT EQU 90 ; uppertemperature limit0027 0014 LOWER_LIMIT EQU 20 ; lowertemperature limit0028 0002 HOT EQU 2 ; flag valueindicating

    0029 ; temperatureUPPER_LIMIT0030 0001 COLD EQU 1 ; flag valueindicating0031 ; temperature