Sunteți pe pagina 1din 13

2/15/13

Sample Lab Report #1

Sample Laboratory Report #1

Supporting Links: Lab Reports Sample Lab Report #2 Site Links: Writing Guidelines Writing Exercises

This web page presents a sample report [Herwald, 1999] written in a microprocessor laboratory course at Virginia Tech. In this report, carets (>) are given to reveal the line spacings in the report's format (in an actual report, these carets would not appear). Also, in this report, the actual appendices are not complete (in an actual report, these appendices would be complete, and each would begin on a separate page). Moreover, an aspect of format that is probably not reflected by your browser is that the report's title and appendices' titles are in 14-point type, the subheadings and text are in 12-point type, and the figure captions are in 10-point type. Note that instructors of other laboratory courses may have different expectations as far as the format and style of lab reports in their classes. For instance, the guidelines for many laboratory reports call for an abstract to appear in the report's beginning. Moreover, some instructors frown on the use of the first person (I or we).

> > >

Design of a Temperature Measurement and Display System Using the 68HC11 Microcontroller
> > Introduction > This report presents a design of a temperature measurement and display system that incorporated the Motorola 68HC11 microcontroller, simply referred to here as the HC11. This design was a valuable experience because similar temperature measurement 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 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. These LEDs acted as temperature indicators. Additionally, the design included a connection between the HC11 and a remote personal computer (PC). This connection served to send messages regarding temperature to the PC. An assembly software program developed for this design performed various functions for using the added hardware. The design had two main objectives. The first objective was to use the HC11 to measure
www.writing.engr.psu.edu/workbooks/labreport.html 1/13

2/15/13

The design had two main objectives. The first objective was to use the HC11 to measure temperature. Included in this objective was the task of connecting the temperature sensor and the LEDs to the HC11. Also included in this objective was the task of designing software to do the following: initialize the A/D converter and serial subsystems; control the measurement and storage of temperature in a RAM variable 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 the temperature went outside of prescribed limits: below 20 degrees Fahrenheit or above 90 degrees Fahrenheit. Included in this objective was the task of connecting the HC11 to a remote PC terminal through an RS232 connection. Another task within this objective was developing software to initialize the serial subsystem. The final task of this objective was to create subroutines for the software program of the first objective to have the HC11 send a message to the PC if the measured temperature went outside the stated limits. This report first presents the procedures for and assessment of the design to have the HC11 measure temperature. Then the report discusses the procedures for and assessment of adding a serial output to the HC11 design to communicate whether the temperature is outside of prescribed limits.

Sample Lab Report #1

Figure 1. Temperature measurement and display system developed for the Motorolla 68HC11 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 microcontroller involved both hardware and software. Hardware was added to control the measurement and display of the temperature. Software 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. Although one of us had a lead role in performing either the hardware or the software, we worked collaboratively in checking both the hardware and software and in troubleshooting any
www.writing.engr.psu.edu/workbooks/labreport.html 2/13

2/15/13

Lab and Report collaboratively in checking both the hardware and Sample software in#1 troubleshooting any problems. > 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 Figure A-1 of 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. The circuitry was scaled so that 0 volts out corresponded to 0 degrees and 5 volts out corresponded to 110 degrees. 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 Figure A-1. The LEDs were located in the breadboard area of the 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 program shown in Appendix C consisted of three subroutines that were called from the main program (Main). The three subroutines were named Startup, GetTemp, and SetDisp. 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 the temperature sensor circuit. The register ADR3 held the result of the A/D conversions, which was treated as an 8-bit binary fraction between 0 and 1. This value was loaded into accumulator A and then multiplied by a scale factor of 110 using 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 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. Accumulator B was cleared to zero and represented the initial value to be written to Port B. If the value in accumulator A was greater than or equal to 20, then the value in accumulator B was shifted one position left and incremented, and 10 was subtracted from accumulator A. The process then repeated itself as long as the value in accumulator A was greater than or equal to 20. An abbreviated form of this process appears in Figure 2 (the complete process appears in Appendix C). 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].

www.writing.engr.psu.edu/workbooks/labreport.html

3/13

2/15/13

Sample Lab Report #1

Figure 2. Flowchart illustrating the determination of the number of Port B bits to enable for 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 and compared that with the measured value represented by the LED display indicators at several different temperature settings. Table 1 shows the results of the measurement comparison, where the actual temperatures measured are shown on the left, and the temperatures represented by the number of LEDs lit are shown on the right. From Table 1, we verified that the developed hardware and software for this part of the lab were functioning properly. Overall, this section of the laboratory went smoothly. Table 1. Comparison of temperature measurements.
Actual Temperature 15F 28F 33F 56F 110F Number of LEDs Lit 0 1 2 4 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 in Appendix D, 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]. This initialization was done by writing control words to the BAUD, SCCR1, and SCCR2 control registers in 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 lead role in connecting
www.writing.engr.psu.edu/workbooks/labreport.html 4/13

2/15/13

Sample Lab Report #1 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, we worked collaboratively in checking both the hardware and software and in troubleshooting any problems. > 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. After waiting for the TDRE bit in the SCSR register to be set, indicating that the HC11 is ready to transmit another byte, the value 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 character strings to the remote PC terminal. Before calling SendMsg, the X index register was set to point to the beginning of the character string to be sent. The SendMsg subroutine 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 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. 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 >
www.writing.engr.psu.edu/workbooks/labreport.html 5/13

2/15/13

> This report has discussed the development of a temperature measurement and display system. The objectives of this lab were to develop the necessary hardware and software to have the HC11 measure temperature and indicate whether that temperature fell outside of prescribed limits. 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.

Sample Lab Report #1

> > >

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].

www.writing.engr.psu.edu/workbooks/labreport.html

6/13

2/15/13

Sample Lab Report #1

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


> > XXXXXXXXXXXXXXXXXX* XXXXXXXXXX XXXXXXXXX XXXXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXX XXXXXXXXXXXX XXXXXXXXXXXXXXXXXX XXXXXXXXXX XXXXXXXXX XXXXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXX XXXXXXXXXXXX
*In an actual report, the pseudocode would appear here. Also note that some professors allow you to substitute an appendix with program flow charts for this appendix.

> > >

Appendix C: Program Listing


> >
A s s e m b l e rr e l e a s eT E R _ 2 . 0v e r s i o n2 . 0 9 ( c )M o t o r o l a( f r e ew a r e ) 0 0 0 1 0 0 0 2 0 0 0 3 0 0 0 4 0 0 0 5 0 0 0 6
www.writing.engr.psu.edu/workbooks/labreport.html

; * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ;T e m p _ M o n i t o r :T h i sp r o g r a mi m p l e m e n t sat e m p e r a t u r e ;m e a s u r e m e n ta n dd i s p l a ys y s t e m .T h eA / Ds y s t e mi s ;u s e dt or e a da na n a l o gt e m p e r a t u r e .T h ev a l u ei s ;s c a l e dt oF a r e n h e i t ,a n dd i s p l a y e do na nL E Db a r ;d i s p l a y .I ft h et e m p e r a t u r ei sa b o v e9 0o rb e l o w
7/13

2/15/13

Sample Lab Report #1

0 0 0 7 0 0 0 8 0 0 0 9 0 0 1 0 0 0 1 1 0 0 1 21 0 0 4 0 0 1 31 0 2 b 0 0 1 41 0 2 c 0 0 1 51 0 2 d 0 0 1 61 0 2 e 0 0 1 71 0 2 f 0 0 1 81 0 3 0 0 0 1 91 0 3 1 0 0 2 01 0 3 2 0 0 2 11 0 3 3 0 0 2 21 0 3 4 0 0 2 31 0 3 9 0 0 2 4 0 0 2 5 0 0 2 60 0 5 a 0 0 2 70 0 1 4 0 0 2 80 0 0 2 0 0 2 9 0 0 3 00 0 0 1 0 0 3 1 0 0 3 20 0 0 0 0 0 3 3 0 0 3 40 0 0 d 0 0 3 50 0 0 a 0 0 3 6 0 0 3 7
www.writing.engr.psu.edu/workbooks/labreport.html

;2 0 ,am e s s a g ei st r a n s m i t t e do v e rt h es e r i a ll i n k . ;P r o g r a m m e r :J M B ; * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *

;D e f i n es o m eI / Or e g i s t e r s P O R T B B A U D S C C R 1 S C C R 2 S C S R S C D R A D C T L A D R 1 A D R 2 A D R 3 A D R 4 O P T I O N E Q U E Q U E Q U E Q U E Q U E Q U E Q U E Q U E Q U E Q U E Q U E Q U $ 1 0 0 4 $ 1 0 2 B $ 1 0 2 C $ 1 0 2 D $ 1 0 2 E $ 1 0 2 F $ 1 0 3 0 $ 1 0 3 1 $ 1 0 3 2 $ 1 0 3 3 $ 1 0 3 4 $ 1 0 3 9

;D e f i n es o m ec o n s t a n t s U P P E R _ L I M I T L O W E R _ L I M I T H O T E Q U E Q U E Q U 9 0 2 0 2 ; C O L D E Q U 1 ; O K E Q U 0 ;u p p e rt e m p e r a t u r el i m i t ;l o w e rt e m p e r a t u r el i m i t ;f l a gv a l u ei n d i c a t i n g t e m p e r a t u r e U P P E R _ L I M I T ;f l a gv a l u ei n d i c a t i n g t e m p e r a t u r e<L O W E R _ L I M I T

;f l a gv a l u ei n d i c a t i n g ; t e m p e r a t u r ei sw i t h i nl i m i t s

C R L F

E Q U E Q U

$ 0 D $ 0 A

;A S C I Ic o d ef o rc a r r a i g er e t u r n ;A S C I Ic o d ef o rl i n ef e e d

;V a r i a b l e s
8/13

2/15/13

Sample Lab Report #1

0 0 3 80 1 0 0 0 0 3 90 1 0 0 0 0 4 00 1 0 1 0 0 4 1 0 0 4 2 0 0 4 3b 6 0 0 0 0 4 4 0 0 4 5 0 0 4 6 0 0 4 7 0 0 4 8 0 0 4 9 0 0 5 0 0 0 5 1 0 0 5 2 0 0 5 3 0 0 5 4b 6 0 08 e0 1f f 0 0 5 5b 6 0 3b db 61 1 0 0 5 6 0 0 5 7 0 0 5 8b 6 0 6b db 61 d 0 0 5 9b 6 0 9b db 62 9 0 0 6 0b 6 0 cb db 63 c 0 0 6 1b 6 0 f2 0f 5 0 0 6 2 0 0 6 3 0 0 6 4 0 0 6 5 0 0 6 6 0 0 6 7 0 0 6 8
www.writing.engr.psu.edu/workbooks/labreport.html

O R G T E M P F L A G

$ 1 0 0 r m b r m b 1 1

;p l a c ei nR A Ma r e a ;c u r r e n tt e m p e r a t u r e ;f l a gi n d i c a t i n gs y s t e ms t a t e ; ( H O T ,C O L D ,o rO K )

O R G

$ B 6 0 0

;E E P R O Ma r e a

; * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ;T e m p _ M o n i t o r :T h i sr o u t i n ei n i t i a l i z e st h es y s t e m ,a n d ;t h e ne n t e r sa ne n d l e s sl o o p .I nt h i sl o o p ,i tr e a d s ;t h ec u r r e n tt e m p e r a t u r e ,u p d a t e st h eL E D s ,a n dt h e n ;s e n d sam e s s a g et ot h es e r i a ll i n k ,i fn e c e s s a r y . ;I n p u t :n o n e ;O u t p u t :n o n e ;R e g i s t e r s / v a r i a b l e sm o d i f i e d :A C C A ,A C C B ,C C R ,T E M P ,F L A G ; * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * T e m p _ M o n i t o r : l d s j s r # $ 1 F F S t a r t u p ;i n i t i a l i z es t a c kp o i n t e r ;i n i t i a l i z eA / Da n dS C I , ; M a i n : j s r j s r j s r b r a G e t T e m p S e t D i s p C h e c k L i m i t s M a i n ;g e tc u r r e n tt e m p e r a t u r e ;u p d a t eL E Dd i s p l a y ;c h e c ku p p e ra n dl o w e rl i m i t s ;r e p e a t i n i t i a l i z eR A Mv a r i a b l e s

; * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ;S t a r t u p :T h i sr o u t i n ei n i t i a l i z e st h es y s t e m .I tc a l l s ;o t h e rr o u t i n e st oi n i t i a l i z et h eA / Ds y s t e ma n dt h e ;S C Is y s t e m .I ta l s oi n i t i a l i z e st h eF L A Gv a r i a b l e .
9/13

2/15/13

Sample Lab Report #1

0 0 6 9 0 0 7 0 0 0 7 1 0 0 7 2 0 0 7 3 0 0 7 4b 6 1 1b db 67 c 0 0 7 5b 6 1 4b db 6a 2 0 0 7 6 0 0 7 7b 6 1 78 60 0 0 0 7 8b 6 1 9b 70 10 1 0 0 7 9 0 0 8 0b 6 1 c3 9 0 0 8 1 0 0 8 2 0 0 8 3 0 0 8 4 0 0 8 5 0 0 8 6 0 0 8 7 0 0 8 8 0 0 8 9 0 0 9 0 0 0 9 1 0 0 9 2 0 0 9 3 0 0 9 4b 6 1 db 61 03 1 0 0 9 5b 6 2 0c 66 e 0 0 9 6b 6 2 23 d 0 0 9 7b 6 2 38 90 0 0 0 9 8 0 0 9 9b 6 2 5b 70 10 0
www.writing.engr.psu.edu/workbooks/labreport.html

;I n p u t :n o n e ;O u t p u t :n o n e ;R e g i s t e r s / v a r i a b l e sm o d i f i e d :A C C A ,I X ,C C R ,F L A G ; * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * S t a r t u p : j s r j s r I n i t A D I n i t S C I ;p o w e ru pt h eA / Ds y s t e m ;i n i t i a l i z et h es e r i a li n t e r f a c e

l d a a s t a a

# O K F L A G

;i n i t i a l i z eF L A G

r t s

; * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ;G e t T e m p :T h i sr o u t i n eg e t st h ec u r r e n tt e m p e r a t u r e . ;I tr e a d st h eA / Dv a l u e ,c o n v e r t si tt oF a r e n h e i t , ;a n ds t o r e st h er e s u l ti nT E M P .A nA / Dv a l u eo f$ 0 0 ;c o r r e s p o n d st o0d e g r e e s ,a n d$ F F( a c t u a l l y$ 1 0 0 ) ;i s1 1 0d e g r e e s ,s ot h eA / Dv a l u ei sm u l t i p l i e db y ;1 1 0t oc o n v e r tt ot e m p e r a t u r e . ;I n p u t :n o n e ;O u t p u t :N e wt e m p e r a t u r es t o r e di nT E M P ;R e g i s t e r s / v a r i a b l e sm o d i f i e d :A C C A ,A C C B ,C C R ,T E M P ; * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * G e t T e m p : l d a a l d a b m u l a d c a # $ 0 0 A D R 1 # 1 1 0 ;r e a dA / Dv a l u e ;m u l t i p l yb y1 1 0 ; t og e tt e m p e r a t u r e ;r o u n dt o8b i t s

s t a a

T E M P

;s t o r en e wt e m p e r a t u r e
10/13

2/15/13

Sample Lab Report #1

0 1 0 0 0 1 0 1b 6 2 83 9 0 1 0 2 0 1 0 3 0 1 0 4 0 1 0 5 0 1 0 6 0 1 0 7 0 1 0 8 0 1 0 9 0 1 1 0 0 1 1 1 0 1 1 2 0 1 1 3 0 1 1 4b 6 2 9c 60 0 0 1 1 5b 6 2 bb 60 10 0 0 1 1 6 0 1 1 7 0 1 1 8b 6 2 e8 11 4 0 1 1 9b 6 3 02 50 6 0 1 2 0b 6 3 25 8 0 1 2 1b 6 3 35 c 0 1 2 2b 6 3 48 00 a 0 1 2 3b 6 3 62 0f 6 0 1 2 4 0 1 2 5 0 1 2 6b 6 3 8f 71 00 4 0 1 2 7 0 1 2 8b 6 3 b3 9 0 1 2 9 0 1 3 0
www.writing.engr.psu.edu/workbooks/labreport.html

r t s

; * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ;S e t D i s p :T h i sr o u t i n eu p d a t e st h eL E D st od i s p l a y ;t h ec u r r e n tt e m p e r a t u r e .T h eL E D sa r ea r r a n g e da sa ;b a rd i s p l a yw i t har a n g eo f2 0-9 0d e g r e e s ,i n1 0 ;d e g r e es t e p s .T h i sr o u t i n ed e t e r m i n e sh o wm a n yo ft h e ;L E D ss h o u l db et u r n e do nb a s e do nt h ec u r r e n tt e m p e r a t u r e . ;I n p u t :T E M Pv a r i a b l e ;O u t p u t :n o n e ;R e g i s t e r s / v a r i a b l e sm o d i f i e d :A C C A ,A C C B ,C C R ; * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * S e t D i s p : l d a b l d a a # $ 0 0 T E M P ;a l lL E D so f fi n i t i a l l y ;g e tc u r r e n tt e m p e r a t u r e

S D _ L o o p : c m p a b l o l s l b i n c b s u b a b r a # 1 0 S D _ L o o p ;v a l u e=v a l u e-1 0 ;r e p e a t # 2 0 U p d a t e _ L E D s ;i sv a l u e 2 0 ? ;b r a n c hi fn o t ;e l s e ,t u r no nn e x tL E D

U p d a t e _ L E D s : s t a b P O R T B ;u p d a t et h eL E D s

r t s

; * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
11/13

2/15/13

Sample Lab Report #1

0 1 3 1 0 1 3 2 0 1 3 3 0 1 3 4 0 1 3 5 0 1 3 6 0 1 3 7 0 1 3 8 0 1 3 9 0 1 4 0b 6 3 cb 60 10 0 0 1 4 1b 6 3 f8 15 a 0 1 4 2b 6 4 12 31 2 0 1 4 3b 6 4 3c 60 2 0 1 4 4 0 1 4 5b 6 4 5f 10 10 1 0 1 4 6b 6 4 82 73 1 0 1 4 7 0 1 4 8b 6 4 af 70 10 1 0 1 4 9b 6 4 dc eb 6e 2 0 1 5 0b 6 5 0b db 6c 5 0 1 5 1b 6 5 32 02 6 0 1 5 2 0 1 5 3 0 1 5 4b 6 5 58 11 4

;C h e c k L i m i t s :T h i sr o u t i n ec h e c k st os e ei ft h ec u r r e n t ;t e m p e r a t u r ei sw i t h i nt h eu p p e ra n dl o w e rl i m i t s .I f ;n o t ,t h e naw a r n i n gm e s s a g ei st r a n s m i t t e do v e rt h e ;s e r i a ll i n k . ;I n p u t :T E M P ,F L A G ;O u t p u t :n o n e ;R e g i s t e r / v a r i a b l e sm o d i f i e d :A C C A ,A C C B ,I X ,C C R ; * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * C h e c k L i m i t s : l d a a c m p a b l s l d a b T E M P # U P P E R _ L I M I T C h e c k _ L o w e r # H O T ;g e tc u r r e n tt e m p e r a t u r e ;t e m p u p p e rl i m i t ? ;b r a n c hi fn o t ;h a v ew ea l r e a d ys e n ta ; c m p b b e q F L A G C L _ E x i t ; w a r n i n gf o rt h i s ? ( i . e . ,i sF L A G= =H O T ? )

;b r a n c hi fs o( d o n ' tr e p e a t ; w a r n i n gm e s s a g e )

s t a b l d x j s r b r a

F L A G # H O T _ M S G S e n d M s g C L _ E x i t

;u p d a t ef l a g ;s e n d" h o t "w a r n i n gm e s s a g e

;a n de x i t

C h e c k _ L o w e r : c m p a # L O W E R _ L I M I T ;t e m p$ 1 0 2 F

> > >

References
>
www.writing.engr.psu.edu/workbooks/labreport.html 12/13

2/15/13

Sample Lab Report #1

> Lineberry, Bob, "Computer Engineering Laboratories Website at Virginia Tech," http://www.ee.vt.edu/cel (Blacksburg, VA: ECE Department, 1998), ECpE 4535: Laboratory Assignments, Lab X. > Motorola Corporation, M68HC11 E Series: Reference Manual, rev. 3 (Oak Hill, Texas: Motorola Corp. 1991), chapters 9 and 12. > Spasov, Peter, Microcontroller Technology: The 68HC11, 2nd ed. (Englewood Cliffs, NJ: Prentice Hall, 1996), pp. 107, 355-359, 460.

Last updated 1/00 http://writing.eng.vt.edu/

www.writing.engr.psu.edu/workbooks/labreport.html

13/13

S-ar putea să vă placă și