© Thiebaut 2003

You should have the code of the small program you had to write for this lab. It should be a short loop that increments ACCA and stores it at the same address over and over (which is to say, you should use the direct addressing mode.)
Assemble it and enter it in the kit. Then run it!
You might also wnat to have available the handouts titled "Motorola Semiconductors Appendix B," and "Unit Seven: Interfacing Fundamentals."
The goal of the series of steps below is for you to reconstruct the timing diagram of the execution of the program, while observing only a couple of signals at a time with the oscilloscope.
Probing Signals:
Step 1
The first signal we want to probe is φ2 (Phi-2). It is one of several signals generated by the processor that are available from wiring blocks on the kit. φ2 can be picked up on a small 8-hole block, just above the row of 8 LEDs, next to circuit U4, as shown in Figure 1 below. (Note: By the way, LINE is a digital (0 to 5V) signal that is extracted from the power supply of the kit, and that oscillates at 60Hz, the same frequency as the 110V current distributed by the AC outlet.)
Figure 1. Phi-2 Block on 6800 Microprocessor Kit.
The second signal we'll watch along with φ2 is R/W'. Connect φ2 to one probe of the scope and R/W'to the other probe, and observe them. Switch between R/W' and φ2 for the source for the trigger, until you get a clean display. Which signal is best as trigger and why?
Using the graph paper attached to this lab (or any paper you like) to record φ2 and R/W'.
Can you recognize the infinite loop of your program? What element of the display unequivocally defines the loop?
How long does your loop last (use the scope time-cursors or a function from the time menu to measure this time)? Can you relate this to the number of cycles required to execute your program?
How often does your loop repeat in one second (here again make the scope give you the answer)?
Side step - Benchmark programs and MIPS ratings
If we were to assume that your loop is representative of most programs running on 6800 processors, then we can use your program as a benchmark. A benchmark is a test program that can be used as a yard stick for measuring the average performance of a computer system. The performance we are interested here is the MIPS rating of the 6800. MIPS stands for Million Instructions Per Second.
The idea here is to count the number of instructions executed in 1 second, and to use this number as a measure of how powerful the processor is. Since you know how many instructions are executed in your loop, along with the number of loops that execute in 1 second, you can compute how many million instructions execute in 1 second. What is the MIPS rating of the 6800? (It may not be the same value we computed in class, but it shouldn't be too different)
Step 2:
The next signal you need to observe is VMA. VMA will be 1 whenever the processor is accessing memory, and will be 0 when the processor is involved with an internal operation. Because you can only observe 2 signals at a time, you will have to observe VMA with R/W', then VMA with φ2, and record it in the timing diagram so that the relationship between all three signals is reported accurately.
Step 3:
The next step is to observe the behavior of the address bus during the loop. There are 16 bits of addresses, but since your program fits in only a few bytes of memory, most of the memory address bits remain the same during the program. Only the least significant bits change. For this reason we can simplify our task by monitoring the one that changes most: A0. A0 is the least significant bit, and will be 0 when the processor accesses an even address, and 1 otherwise.
Connect one probe of the scope to A0. What other signal do you need to monitor at the same time to get a clear picture of when A0 changes during the loop?
Record the behavior of A0 on the timing diagram.
Step 4:
We will use the same technique to record the behavior of the data bus: we'll only observe D0. Connect a probe to D0 and record its behavior in the timing diagram.
Make sure you get to see R/W' and D0 at the same time.Question: Why does D0 seem to be both high and low during the short time that R/W' is low, and that it seems impossible to synchronize the scope so as to show D0 in a stable form?
Putting it all together
Once the timing diagram is complete, isolate the cycles corresponding to individual instructions, and reconstruct the execution of the instructions on your timing diagram. Include a description of what is happening during each cycle with the processor-memory system. This will include a discussion of what the MPU is doing in general (fetch, execute...), what is happening on the address and/or data bus, what is happening with the R/W' and VMA lines, etc...
You can use this timing diagram if it fits your needs, or create your own. (You can use Form5A-BW or similar ones from the Web site http://www.mathematicshelpcentral.com/graph_paper.htm to graph your timing diagrams.) Make sure you clearly highlight the cycles belonging to the different instructions of your program, and write at the bottom of each column what happens during the cycle (e.g. "op code fetch", "1st byte operand fetch", "internal cycle", etc.)