EEL4767 - LABORATORY MANUAL DEPARTMENT OF ELECTRICAL...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: LABORATORY MANUAL DEPARTMENT OF ELECTRICAL & COMPUTER ENGINEERING UNIVERSITY OF CENTRAL FLORIDA EEL 4767 COMPUTER SYSTEM DESIGN I Revised August 2005 TABLE OF CONTENTS SAFETY RULES AND OPERATING PROCEDURES LABORATORY SAFETY INFORMATION EXPERIMENT # 1 Using the EVB monitor commands (BUFFALO) EXPERIMENT # 2 Assembly language programming, compile, assemble and execution EXPERIMENT # 3 Part A: I/O manipulation Part B: Interrupts EXPERIMENT # 4 Seven Segment Display EXPERIMENT # 5 Interfacing MC68HC11 EVB with the Tektronix TLA 715 Logic Analyzer. USEFUL LINKS Useful Links Safety Rules and Operating Procedures 1. Note the location of the Emergency Disconnect (red button near the door) to shut off power in an emergency. Note the location of the nearest telephone (map on bulletin board). 2. Open drinks and food are not allowed near the lab benches. 3. Report any broken equipment or defective parts to the lab instructor. Do not open, remove the cover, or attempt to repair any equipment. 4. When the lab exercise is over, all instruments, except computers, must be turned off. Return substitution boxes to the designated location. Your lab grade will be affected if your laboratory station is not tidy when you leave. 5. University property must not be taken from the laboratory. 6. Do not move instruments from one lab station to another lab station. 7. Do not tamper with or remove security straps, locks, or other security devices. Do not disable or attempt to defeat the security camera. 8. ANYONE VIOLATING ANY RULES OR REGULATIONS MAY BE DENIED ACCESS TO THESE FACILITIES. I have read and understand these rules and procedures. I agree to abide by these rules and procedures at all times while using these facilities. I understand that failure to follow these rules and procedures will result in my immediate dismissal from the laboratory and additional disciplinary action may be taken. ________________________________________ Signature Date i ________________ Lab # Laboratory Safety Information Introduction The danger of injury or death from electrical shock, fire, or explosion is present while conducting experiments in this laboratory. To work safely, it is important that you understand the prudent practices necessary to minimize the risks and what to do if there is an accident. Electrical Shock Avoid contact with conductors in energized electrical circuits. Electrocution has been reported at dc voltages as low as 42 volts. 100ma of current passing through the chest is usually fatal. Muscle contractions can prevent the person from moving away while being electrocuted. Do not touch someone who is being shocked while still in contact with the electrical conductor or you may also be electrocuted. Instead, press the Emergency Disconnect (red button located near the door to the laboratory). This shuts off all power, except the lights. Make sure your hands are dry. The resistance of dry, unbroken skin is relatively high and thus reduces the risk of shock. Skin that is broken, wet, or damp with sweat has a low resistance. When working with an energized circuit, work with only your right hand, keeping your left hand away from all conductive material. This reduces the likelihood of an accident that results in current passing through your heart. Be cautious of rings, watches, and necklaces. Skin beneath a ring or watch is damp, lowering the skin resistance. Shoes covering the feet are much safer than sandals. If the victim isn’t breathing, find someone certified in CPR. Be quick! Some of the staff in the Department Office are certified in CPR. If the victim is unconscious or needs an ambulance, contact the Department Office for help or call 911. If able, the victim should go to the Student Health Services for examination and treatment. Fire Transistors and other components can become extremely hot and cause severe burns if touched. If resistors or other components on your proto-board catch fire, turn off the power supply and notify the instructor. If electronic instruments catch fire, press the Emergency Disconnect (red button). These small electrical fires extinguish quickly after the power is shut off. Avoid using fire extinguishers on electronic instruments. Explosions When using electrolytic capacitors, be careful to observe proper polarity and do not exceed the voltage rating. Electrolytic capacitors can explode and cause injury. A first aid kit is located on the wall near the door. Proceed to Student Health Services, if needed. ii EXPERIMENT #1 EEL 4767L Objectives: The objective is to learn how to compile, assemble and load M68HC11 code, how to use the EVB monitor commands (BUFFALO) and to get used to assembly language programming. The goal is that by the end of this lab, you should be able to understand and modify the assembly code, and also should be able to monitor its execution. Resources: 1. Motorola Inc., (1990) M68HC11 Reference Manual. Phoenix, Arizona: Motorola Literature Distribution. 2. Chapter 2, Han-Way, Huang, (1996) MC68HC11 An Introduction - Software and hardware interfacing. Minnesota: West Educational Publishing. Procedure: 1. Connect your PC to M68HC11EVB Board. Make sure you connect power to the board. Reset the Board. 2. Enter the code at the bottom in any editor and save it as "LAB1.ASM”. Make sure your file is stored at a proper place (i.e., AxIDE or Temp folder, no spaces). This code actually does addition, i.e., 10+10 = 20. 3. Compile your code using AxIDE. Shortcut should be on your desktop (or find executable in ‘C:\AxIDE’ folder). If any errors occur, correct your program and compile it again. If you experience any problems check the communication parameters; they should be: BAUD RATE 9600 PARITY None DATA BITS 8 STOP BITS 1 PORT COM1 4. Once you have successfully compiled your code, upload your “LAB1.S19” file into the Microprocessor. You will have to write “>load t” before you upload file. 5. Run your program by writing “>go 2030”. If the program works properly, it displays: 1- 1 The final number is: 14 in Hexadecimal. 6. Use BR (Break Point) and T (Trace) to trace your program step by step observing how Accumulators A and B and Index Register X change as your program is executed. Experiment with other commands, e.g.: BF, HELP, MD, MM, RM, and P. 7. Try to understand the assembly language code and correlate the results that you see on screen with the code. Especially try to figure out how string is printed and the addition of two numbers is performed. 8. Modify the above program to add an additional message display on a new line: Welcome to EEL 4767. 9. Modify the program to add 20 and 20. 10. EXTRA CREDIT (Subtraction): Modify your program to subtract two numbers, i.e., 20-10=10. 11. Try to understand the assembly code (*.asm file) and see how addition is being done. Pay special attention to the conversion of numbers to ASCI before you display. Note: You should remember the following: • Every program requires using some allocated memory which should be within the range of valid RAM addresses. • Every string requires a special number specifying the end of the string. • The only way of communication between you and the board is your program. So when you are having a problem, it most probably has something to do with your program. • Make sure that you keep a log of all your experiments and save your work. You might not find it on same machine next week. Deliverables: Each group is required to submit one report. The report should include all objectives, resources, procedures, 3-line description of commands (with examples 1- 2 preferably with screen shots), all files (*.asm, *.lst), and screen shots of the results. Make sure to add your original work in the report. It is due before the start of Lab2. No late submissions are allowed (no exceptions). Make sure you know the rules and any additional deliverables required for the lab report. Code *--------------------------------------------------------------------* Date: * Programmer: * Group members: * File name: * Program description: This is a sample program used for EEL 4767 lab 1. * The program stores decimal ten in accumulator A adds ten to it and * prints it on the screen using a routine stored in ROM. We called the * routine OUTSTRG, it will print a string of ASCII bytes if the pointer * to the string is stored in index register X. The string to be printed * should end with the end of transmission character $04. Other routines * are provided in ROM for public use. See page 141 of MC68HC11 An *Introduction - Software and hardware interfacing for further information. *--------------------------------------------------------------------* The following routines are described on page 3-3 of the M68HC11EVB * Evaluation Board User's Manual UPCASE EQU $FFA0 OUTA EQU $FFB8 OUTSTRG EQU $FFC7 INCHAR EQU $FFCD ORG $2000 Reserves space in memory for storing stuff MEMSTO FCB $00 STRING FCC 'The final number is: ' MEMSTO1 FCB $00 MEMSTO2 FCB $00 STRING1 FCC ' in Hexadecimal.' FCB $04 ORG $2030 Reserves memory for the program START LDAA #10 Loads ten in decimal to accumulator A STAA MEMSTO ADDA MEMSTO STAA MEMSTO LDAB #%00001111 ANDB MEMSTO ADDB #48 STAB MEMSTO2 LDAB #%11110000 ANDB MEMSTO LSRB 1- 3 LSRB LSRB LSRB ADDB #48 STAB MEMSTO1 LDX #STRING JSR OUTSTRG END SWI *----------------------------------------------------------------- Brain Teasers: • What is BUFFALO? • What does a label named BUFFALO in your code do? • How does OUTSTRING work? Try correlating it with the actual hardware register. • Try not putting an end to your string and see what happens. 1- 4 EXPERIMENT #2 EEL 4767L Objectives: The objective is to learn assembly language programming, how to compile, assemble and execute code on MC68HC11 and to get used to machine language. The goal is that by the end of this lab, you should be able to write assembly code, see it being executed and converted to machine instructions. Resources: 1. Motorola Inc., (1990) M68HC11 Reference Manual. Phoenix, Arizona: Motorola Literature Distribution. 2. Chapter 3, Han-Way, Huang, (1996) MC68HC11 An Introduction - Software and hardware interfacing. Minnesota: West Educational Publishing. Procedure: Part 1 1. Enter the code at the bottom in any editor and save it as "LAB2ERR.ASM”. Or you can download "LAB2ERR.ASM” and try to read the instructions in that file to understand what’s going on. 2. Try to fix errors in the highlighted parts of the code. You may have to add or remove few labels. Compile and Run it to see the result “The final number is: 0A in Hexadecimal”. Think about these: Where would you find help if you are stuck? Try ‘HELP’ or ‘?’. Experiment with T, GO, R, MD, and other commands available to you in AxIDE. Once you are able to see the output, Open lab2err.lst and see how each instruction is converted to machine code. You may find it useful to have a look at the tables underneath every instruction at the end of your book. What are the memory locations for MEM, MEM1 and MEM2? Give their 2- 1 values in hexadecimal. What number should be added to a sum of BCD number that is greater than nine or if there is a carry to the next higher nibble? Locate the address, length, code/data, checksum and type fields in your *.LST file. Part 2 3. Write a program with 68HC11 assembly language to transfer 20 unpacked BCD numbers stored at $00--$13 into 10 packed BCD numbers stored at $14--$1D. For example, two unpacked BCD numbers $08 and $02 can be transferred into a packed BCD number as $82. Output the result on the screen. Note: A BCD representation of a decimal digit is equivalent to its 4-bit, unsigned integer representation. Therefore, a single byte can store two BCD digits, referred to as the packed BCD number. On the other hand, the unpacked BCD number requires that each decimal digit be represented by a byte, where the high-order nibble of the byte is 0 and the low-order nibble of the byte is occupied by the BCD representation of the digit. 4. Save your file as "LAB2.ASM”. Assemble and Run using AxIDE. Make sure that your results are correct. Deliverables: Each person (or group) is required to submit one report. The report should include all objectives, resources, procedures, description of commands (with examples preferably with screen shots), all files (*.asm, *.lst), and screen shots of the results. Make sure to add, in your report, your original work along with explanation of results and problems faced. It is due before the start of Lab3. Late submissions will be penalized. Make sure you know the rules and any additional deliverables required for the lab report as mentioned below. 2- 2 Source Code *--------------------------------------------------------------------------------------------------- * Date: * Programmer: * Group members: * File name: * Program description: This is a sample program used for EEL 4767 lab 2. * This program contains 8 errors which the student needs to fix. The * Program should add decimal 5 two times and store it in memory location * "MEM". Soon after, the program will convert the number stored in "MEM" * to ASCII and display it on the screen using the ROM routine OUTSTRG. * The program "masks" out the high nibble from the number stored in memory * location "MEM" converts it and stores it in memory location "MEM1. * Similarly, then takes the low nibble of the number stored in "MEM", * converts it, and stores it in "MEM2". * The convention is done by the subroutine "CONVERT". Finally the program * returns to "BUFFALO" monitor program. The final display should read: * The final number is: 0A in Hexadecimal *--------------------------------------------------------------------------------------------------OUTSTRG EQU BUFFALO EQU $FFC7 $C030 ORG $2000 MEM FCB $00 STRING FCC 'The final %^&*%# is: ' MEM2 FCB $00 STRING1 FCC ' in Hexadecimal.' FCB $04 ORG $E000 START LDAA STAA ADDA STAA LDAB ANDB LSRB LSRB LSRB LSRB BSR STAB LDAB ANDB BSR STAB CONVERT MEM1 #%00001111 MEM CONVERT MEM2 LDX JSR JMP #STRINGG OUTSTRG BUFFALO #5 MEM MEM MEM #%11100000 MEM END 2- 3 ***** SUBROUTINES ***** *This subroutine converts numbers stored in accumulator B to ASCII *characters that represent the number in HEX *---------------------------------------------------------------CONVERT CMPB #9 BHI LETTER ADDB #48 Add decimal 48 to convert numbers to ASCII BRA DONE LETTER ADDB #55 Add decimal 55 to convert letters to ASCII DONE RTS *----------------------------------------------------------------- Brain Teasers: • Sometimes you may get additional dumps on your screen beyond your required results. Why? (Try playing with stack pointers). • What happens if you try to execute code from a location other than where your code is? • Try writing your code in ROM area (at E000-FFFF and 0036-00FF) and check if it was written there? • What number should be added to a sum of BCD number that is greater than nine or if there is a carry to the next higher nibble? Note: You should remember the following: • Every program requires using some allocated memory which should be within the range of valid RAM addresses. • Every string requires a special number specifying the end of the string. • The only way of communication between you and the board is your program. So when you are having problem, it most probably has something to do with your program. • Make sure that you keep log of all your experiments and save your work. You might not find it on same machine next week. 2- 4 Lab Reports (Requirements) Lab2: • Follow the rules below. Also follow all the steps in Lab2.doc and complete the required work. • Make sure you show results on AxIDE to Lab instructor. • Explain the conversion of assembly code to machine code (both in your *.lst file) with at-least three examples. Also give at-least one example of the machine code (for assembly code) that you have not used in your program). • It is due before the start of Lab3. Rules: 1. Each person (or group) is required to submit one report. It should be typed, not hand-written. Take time to format you report, Please don't waste too many papers. 2. The report should include objectives, summary of procedures, all files (*.asm, *.lst), and screen shots of the results. See more requirements for each lab above. 3. You may follow the report template below. Make sure to add and explain your original work in the report. 4. Your code should be properly commented explaining which each important step/command. 5. Pay special attention on summary and your observations for the lab. 6. Reports are due before the next Lab (not lab session). Late submissions will be penalized. 2- 5 EXPERIMENT #3 EEL 4767L Part A Objectives: The objective is to learn the EVB monitor commands (BUFFALO), learn how to compile, assemble and load M68HC11 code, and understand the output of .lst and .s19 files, understand the I/O manipulation of ASCII characters. Resources: 1. Motorola Inc., (1990) M68HC11 Reference Manual. Phoenix, Arizona: Motorola Literature Distribution. 2. Chapter 3, Han-Way, Huang, (1996) MC68HC11 An Introduction - Software and hardware interfacing. Minnesota: West Educational Publishing Procedure: 1. Write a program with 68HC11 assembly language to read two numbers from 0 to 9 in decimal from the keyboard and add them. Output the result on the screen. Name this lab as lab3a.asm. 2. Check your code for any errors. 3. Compile your code using "AXIDE". If any errors occur, correct your program and compile it again. Annotate any errors. Run your program to be sure that the output is correct. You can use breakpoints (br) to debug your code. 4. Once your program running correctly, make a printout of your CORRECTED source file (lab3a.asm) and annotate on it all errors found. Explain how you fixed each error. Remember to mention the reason for each error, explain it! 5. Make a printout of your .lst file. 3- 1 Lab Report Submission: Checklist: 1. Objectives, Resources and Procedure for completion of this lab 2. Source code of lab3a.asm with proper comments 3. lab3a.lst 4. lab3a.lst 3- 2 Part B Objective: To learn M68HC11 assembly language. To learn to use interrupts. Resources: 1. Motorola Inc., (1990) M68HC11 Reference Manual. Motorola Literature Distribution. Phoenix, Arizona: 2. Chapter3, Han-Way, Huang, (1996) MC68HC11 An Introduction - Software and hardware interfacing. Minnesota: West Educational Publishing. Specifications: The output of the stopwatch should have four digits to display in format of wx.yz, where w, x, y and z represent tens, unit, tenth and hundredth of seconds, respectively. Use an external interrupt (IRQ*) pin to start/stop/reset the timer. Procedure: The program consists of three parts: a) Main program b) Display function c) Interrupt service routine IRQ_HND A. Main Program: It can be broken into segments. 1. Initialization 3- 3 OUTA EQU $FFB8 2. Initialize timer variables: W, X, Y, and Z. 3. Initialize the control variable: CNTRL. 4. Interrupt Initializations. 5. Program. Enable interrupt; Waiting loop: Keep checking the control variable CNTRL to wait interrupt occurrence and changing its value. If CNTRL=0, jump to the timer loop. Timer loop: Here the timer increments the different digits using a delay loop of 10 ms. In every 10 ms the hundredths digit is incremented and checked to see if it reaches 10. If so, then the tenths digit is incremented and the hundredth digit is reset to zero. When the tenths digit reaches 10, it is reset to zero, and the ones digit is incremented. When the ones digit reaches 10, it is reset and the tens digit is incremented. During this loop, the program should display the time every second to the screen. The timer should be stopped by an external interrupt then display the time. When the interrupt occurs, and then CNTRL is changed to 1(stop) or 2(reset), let program jump to the waiting loop. B. Display Function The display function can use OUTA routine from the buffalo program. Display the time in the format like ##.## to the screen. C. Interrupt Service Routine IRQ_HND: When IRQ* pin is pulled down to low (using a debounce switch connected to ground), the external interrupt occurs. The routine should change the value of CNTRL (0, 1 or 2) then display the time. 3- 4 Make a printout of the .lst file and comment all the lines of code. Questions: How long, in seconds, is a M68HC11EVB clock cycle? If there is an inaccuracy on the output of the screen, what could be the reason? What are the requirements of interrupt processing? Lab Report: Turn in the following material 1. Printout of your source file ( .asm file with all comments). Remember to include a detailed program description. 2. Printout of your .LST File and .S19 File. 3. Answer all questions. 3- 5 EXPERIMENT #4 EEL 4767L Seven Segment Display Objective: 1) To learn basic M68HC11 assembly language. 2) To learn to encode decimal numbers into a 7 segment LED display using the HC11's I/O ports. 3) To understand the hardware concepts while connecting hardware to the M68HC11 I/O ports. 4) To learn the timer functions. Resources: 1. 2. Motorola Inc., (1990) M68HC11 Reference Manual. Phoenix, Arizona: Motorola Literature Distribution. Chapter3, Han-Way, Huang, (1996) MC68HC11 An Introduction - Software and hardware interfacing. Minnesota: West Educational Publishing. Specifications: Design and assemble a program named LAB4.ASM that will display BCD (Binary coded decimal) numbers on a 7 segment LED display. The program should read from memory the binary representation for digits 0-9 and display them in ascending order on the seven segment LED display provided. The first number displayed should be "0". It should be shown for 0.5 seconds. Use the timer to achieve this 0.5 seconds delay. The same delay should be used for all numbers displayed. After the first delay, number "1" should appear and later number "2". Continue in ascending order until a "9" is displayed, after "9" have a "E" representing that your program has ended. Get your verification sheet signed by the lab instructor. Use RTI (Real-Time Interrupt) to implement the time delay. Your program should use ports A and D, which are located at $1000 and $1008, respectively. Port D needs to be initialized by writing 3F (hex) to memory location $1009. A pin diagram of the EVB interconnection will be given in the lab. Use the desired pins for the interconnection. Pin 1 is ground. 4- 1 On the following diagram, the student annotate how each segment is mapped to each bit of ports A and D PORT A LED 7 Segment display a f 0 7 $1000 b 7 PORT D 0 7 DDRD 0 $1008 c e d $1009 Figure 1: LED 7 Segment display 1. 2. 3. 4. 5. Draw a circuit diagram in which the display is shown with its segments and the necessary connections to the M68HC11 ports. Remember to include pull-up resistors and power connections too. Be careful, not all bits from port A can be used for output (see example in Figure 4.) Map each LED segment to the specific bit that will turn the segment on. For example, if port A bit zero is going to turn on the segment "a"; an "a" should be written in the corresponding box for bit zero. Do it for all segments. Remember that some pins are not used. Map ports correctly. Make your connections to the EVB board. MAKE SURE THAT THE POWER IS OFF! Once you know that all connections to the HC11's I/O port are correct, you can power up the EVB board. Start testing your connections using the "BUFFALO" monitor. By using Memory Modify (MM) command, you can write test bits directly to the ports and check that your segments are hooked correctly. For example, if a specific bit is written to a port, the corresponding segment connected to it should turn on. You can write your own program or use the code provide at the end of the Lab. Place comments. 4- 2 Pin Out Configuration Pin Number 1 2 3 4 5 6 7 8 9 10 11 12 13 14 Connections Anode A Anode F Common Cathode No Pin No Pin No Connection Anode E Anode D Anode D. P. Anode C Anode G No Pin Anode B Common Cathode 1 14 2 13 3 12 4 11 5 10 6 dp 7 9 8 Figure 2: Seven-Segment Internal Circuit Diagram 4- 3 Lab Report Submission: Checklist: 1. Objectives, Resources and Procedure for completion of this lab 2. Source code of lab4.asm with proper comments 3. lab4.lst 4. Screen shot of output of lab4.asm Vcc 1Y1 2A4 1Y2 2A3 1Y3 2A2 1Y4 2A1 2G 20 19 18 17 16 15 14 13 12 11 1 3 5 6 7 8 9 10 1G 2 4 1A1 2Y4 1A2 2Y3 1A3 2Y2 1A4 2Y1 GND Figure 3: Pin Layout 74LS244 Vcc 20 PA0 1K 1 PA1 74LS244 1K PA2 1K 2 7 hp5082 7-SEGMENT 10 3 GND Figure 4: Circuit Diagram 4- 4 Source Code Program *---------------Program starts-----------------------REGBAS EQU $1000 PORTD EQU $08 DDRD EQU $09 PORTA EQU $00 OUTPUT EQU $3F TMSK2 EQU $24 TFLG2 EQU $25 PACTL EQU $26 HALFSEC EQU RTIF EQU $40 OUTA EQU $FFB8 N EQU 11 ORG $00EB JMP RTI_HND ORG $00 BCDTBLA FCB BCDTBLD FCB RTI_CNT RMB FCB 16 $70,$20,$58,$68,$28 $68,$78,$60,$78,$68,$58 FCB $38,$20,$30,$30,$28 $18,$18,$20,$38,$38,$18 2 ORG $C000 LDX #REGBAS LDAA #OUTPUT STAA DDRD,X LDY #0 4- 5 LOOP LDAA BCDTBLA,Y STAA PORTA,X LDAB BCDTBLD,Y STAB PORTD,X LDAA #$30 JSR OUTA LDS #$003F LDX #REGBAS LDD #HALFSEC STD RTI_CNT BSET PACTL,X $03 LDAA #RTIF STAA TFLG2,X STAA TMSK2,X CLI LOOP1 LDD RTI_CNT BNE LOOP1 INY CMPY #N BLO LOOP SWI RTI_HND LDX #REGBAS LDAA #RTIF STAA TFLG2,X LDX RTI_CNT DEX STX RTI_CNT RTI END 4- 6 EXPERIMENT #5 EEL 4767L Objective: The purpose of this lab is to interface MC68HC11 EVB with the Tektronix TLA 715 Logic Analyzer. This lab will also make the student aware of the Logic Analyzer functions and software. This lab is an extension of Lab 4 using LEDs. This experiment will help the student to have a basic awareness of the Bus Interfacing techniques and Timing Analysis. The output from the EVB ports are connected to the Logic Analyzer signal lines (probes) and the outputs are observed using the Logic Analyzer Software version 4.2. Setup: 1. Connect the channel probe to retaining brackets A2-A3 of the Logic Analyzer 2. Each probe is uniquely numbered by the color band as follows: a) Black -Probe 0 b) Brown -Probe 1 c) Red -Probe 2 d) Orange -Probe 3 e) Yellow -Probe 4 f) Green -Probe 5 g) Blue -Probe 6 h) Purple -Probe 7 There will be an extra probe, which is has no color band. This is the common ground probe. Connect this probe to the GND pin on the EVB board. 3. Connect the 8 podlets in the podlet holder with an 8 channel differential leadset to the EVB ports using shorting wires. The outputs from the Ports should map to the following probes. a) Output for LED segment A – Connect to -Probe 0 b) Output for LED segment B – Connect to -Probe 1 5- 1 c) Output for LED segment C – Connect to -Probe 2 d) Output for LED segment D – Connect to -Probe 3 e) Output for LED segment E – Connect to -Probe 4 f) Output for LED segment F – Connect to -Probe 5 g) Output for LED segment G – Connect to -Probe 6 h) Leave the remaining two probes unconnected 4. Switch on the EVB board 5. Load and Build the program using Buffalo monitor. 6. In the Desktop display of the Logic Analyzer click on the TLA Applications window. a. You will notice the System Window with three icons i. On/Off (This icon should always be set to ON for the logic analyzer to work.) ii. Setup iii. Trigger (Note: Each module has its own Setup and Trigger Window Each module is setup individually) Configure the Setup window before configuring Trigger window because the setup window settings affect the trigger window settings) b. Click on the Setup Icon, which will open the Setup Window. i. In the clocking option Select “Internal” and set the clock frequency to 50 ms ii. In the Group Name option Select A3. Remember this group name, which refers to the probes’ connector pod. Else, if A2 is connected then select A2 instead. iii. Go back to the System window and Select Trigger. iv. In the Easy Trigger option Select Simple Events. v. In the Simple Events, select the option Run until the Stop Button is pressed. vi. Now the logic analyzer is interfaced to the board and you are ready to begin observing high-speed digital signals. Observing Signals and Output: 1. In the setup Window Click on New. 2. Select the Waveform Window Option. 3. Select LA1 for the Data From option. 5- 2 4. You can specify a name for the Waveform too. You may call it Lab5 for instance. 5. Now maximize the Waveform window. 6. Press Run button. 7. Run the ASM program in the Buffalo monitor. 8. After program executes, press Stop on the Waveform window to end capture of the data from logic analyzer probes that is being read and saved in the Logic Analyzer’s memory. 9. You will see the output displayed as a timing waveform on the screen. This timing waveform depicts the history of logic 0 and logic 1 states of each signal that the probe was connected to during the sampling interval until the Stop button was pressed. Exercise: 1. Count the number of clock cycles elapsed for the data on probe to remain valid (i.e. period or interval for which the data is consistently applied before the next data comes in)? 2. Calculate the period in micro-seconds for the above. 3. Insert a NOP operation in the assembly code for the experiment such that there is an additional instruction executed causing a slight delay or increase in the period of the output signals. Repeat steps 1 and 2 above with the NOP inserted. 4. Increase the Logic Analyzer internal clock period to TBD msec. a. b. 5. Determine the fastest clock frequency the program can run such that output can still be observed. Why do you think the program cannot run faster than the said frequency? Reduce the Logic Analyzer internal clock period to TBD nsec. a. b. 6. Determine the slowest clock frequency the program can run such that the complete waveform outputs can be observed. Why do you think the program cannot run slower than the said frequency? Determine the difference in time period (microseconds) between (2), (3), (4), (5) above (if any) while observing the event described in (1). 5- 3 USEFUL LINKS EEL 4767L 1.6811 tutorial http://www.ee.upenn.edu/rca/pchardware/6811/motorola6811.html 2.6811 Reference manual http://www.isystem.com/Services/Download/Document/91/6811.pdf 3.Hc11 resources and links http://www.cotw.com/projects/hc11/ 4.Assembler Manual http://conmael.ee.pitt.edu/courses/0142/hoelzeman/assembler-manual.html 5. Sources of Information on 6811 (FTP, BBS, Mailing List and more) http://www.esacademy.com/automation/faq/68hc11/3.htm 6.References, Books and Docs for 6811 http://www.esacademy.com/automation/faq/68hc11/5.htm 7. UTexas Homepage for Microcontroller courses http://www.ece.utexas.edu/~valvano/ 8. Australian University Resources http://mirriwinni.cs.jcu.edu.au/~phillip/Homepage/MicroP.html 9. UMontana Resources for 6811 and 6812 http://www.coe.montana.edu/ee/cady/ee361/hc11lnks.htm 10.Geocities Website for 6811 http://www.geocities.com/SiliconValley/Heights/9681/ 11..Cross Assemblers and Source Codes http://www.programmersheaven.com/zone5/cat26/index.htm 12. Programming Manual http://handyboard.com/techdocs/6811intr.pdf 13. UNM howto on microcontrollers http://www.me.unm.edu/~dgeiger/MicroDes.htm 14. SMU Microprocessors help pages 6- 1 http://termite.engr.smu.edu/3181/manual/manual.html 15.Interrupts intro (short article) http://people.inf.elte.hu/istenes/robotika/miniboard/Doc/UsingTheMiniboard/Interrupts.ht ml 16.Interupts and Resets http://www.csc.uvic.ca/~mcheng/460/notes/interrupts.html 17.Timers and Delays http://www.csc.uvic.ca/~csc230/slides/H.Timer-6up.PDF 18. Short note on interrupt and handlers http://www.sunybroome.edu/~grace_t/micro/lab/ml_irq.html 19. Motorola.com Manuals etc http://e-www.motorola.com/webapp/sps/site/prod_summary.jsp?code=68HC11EA9 20. Interrupt Driven Programs http://handyboard.com/software/icmanual/node118.html 21. Timers and Counters http://people.inf.elte.hu/istenes/robotika/miniboard/Doc/UsingTheMiniboard/TimersCou nters.html 22. Interrupts from BYU http://class.et.byu.edu/eet548/ClassNotes/Interr_Intro.htm 23. Microcontroller Overview http://www.media.mit.edu/physics/pedagogy/fab/ucntrl/fabmicronotes.html 24.7 segment display introduction http://www.iguanalabs.com/7segment.htm 25.Driving a 7 segment dsiplay http://www.melabs.com/resources/articles/ledart.htm 26.Timer and Interrupt Source code http://www.superb.org/Micro/Code/modtime.txt 27. Driving 7 segment display source code http://www.sonofsofaman.com/hobbies/electronics/pic/demos/5d7sled.asp 28. LabViews tutorial Manual http://www.mec.etsmtl.ca/cours/sys862/documents/lview_tutorial.pdf 6- 2 29: Simple LabView Tutorials http://www.eelab.usyd.edu.au/labview/main.html http://www.ceeo.tufts.edu/al/me1/tutorial/ http://engineering.eng.rowan.edu/~gues5612/labview/ http://www-ee.eng.buffalo.edu/faculty/paololiu/edtech/roaldi/tutorials/labview.htm 30. LabView for Dummies http://www.iit.edu/~labview/Dummies.html 31. LabView and Data Acquisition http://www.kostic.niu.edu/DAQ-LabVIEW.html 32. Source Code and Examples for Digital I/O http://www.mooregoodideas.com/FAVIs/Digital_I_O.htm 6- 3 ...
View Full Document

Ask a homework question - tutors are online