EEAP 282: Intro to Microprocessors

Fall 1997, Prof. Frank Merat


General Information

Class Lectures: MW 3:30-4:45pm, Hatch Auditorium
Course Instructor: Frank Merat, flm at case.edu, Glennan 515, x4572
Prof. Merat's Office Hours:
 
Required Text

Syllabus


Teaching Assistants

  • Kapil Sharma kxs81 at eeap.cwru.edu
  • Wenhui Zhao wxz14 at eeap.cwru.edu
  • Zhao Xiang Pan zxp5 at eeap.cwru.edu


  • Lecture Notes

      In 1997 the notes were organized into larger segments and the page numbers corrected to be sequential. The contents of the notes essentially remained the same.

      Part 1 - Pages 1-42. Course syllabus to vi editor. (pdf, 108 kB)
      Part 2 - Pages 50-99. Lab Reports to debugger commands. (pdf, 100 kB)
      Part 3 - Pages 100-155. Sample debugger programs to Kern Lab i/o routines. (pdf, 124 kB)
      Part 4 - Pages 165-221. Branching to double precision math. (pdf, 100 kB)
      Part 5 - Pages 213-237. Stacks to recursive subrooutines. (pdf, 52 kB)
      Part 6 - Pages 238-315. Stack frames to pipelining. (pdf, 132 kB)

    Homework

    • Homework 1 (PDF, 110 kB). Solutions (PDF, 167 kB).
    • Homework 2 (PDF, 52 kB). Solutions (PDF, 35 kB).

      IMPORTANT: Only a few homeworks will be assigned as the emphasis of the course is programming assignments.


    Laboratory Resources

      Over the decade I have taught this course we have used a variety of computer resources. In the early1980's we used the Motorola Educational Board which was interfaced to a Motorola Exormacs 68000 based development system. This board contained a 68000 processor and the TUTOR monitor which allowed the board to be used independent of the Exormacs software development environment. In the late 1980's we switched to a more software based environment using Hewlett-Packard 68000 development tools running on a HP-UX cluster consistsing of Snowhite (the server) and the seven Dwarves (workstations). These tools consisted of H-P's as68 assembler, ld68k linker/loader, and (the most significant part of the H-P development environment) the db68k debugger.

      The student reference manual (55 pages, pdf, 1.72 MB) for the HP-UX development environment gives a summary of the H-P development enviroment which is adequate for almost all EEAP 282 course usage.

      The complete H-P 68000 assembler, linker and debugger manuals are available from Prof. Merat.


    Programming Assignments

      The emphasis of the course is programming; hence, it is expected that most of your work will be expended on programming assignments. We could not find a complete set of 1997 labs so some 1996 files are included here.

    • Lab 1 (PDF, 328 kB) TERMINAL INPUT/OUTPUT
      Reports are to be done individually and turned in during class on October 7th.
      This lab will introduce you to the use of branch and test instructions as well as polled input/output (i/o). You will write a program which reads the keyboard for input and then echoes it TWICE to the terminal screen
    • Lab 2 (PDF, 248 kB) CYCLIC REDUNDANCY CHECK (CRC)
      Reports are to be done individually and turned in during class on xxxx.
      This lab will introduce you to the use of branch and shift instructions as well as program design. You will write a program which computes the CRC for a block of data. For the purposes of this program the block of data will be provided by a series of DC.B statements although, in general, the data would be provided by a data communications buffer.
    • Lab 3 (PDF, 44 kB) CRC SUBROUTINE
      Reports are to be done individually and turned in during class on xxxx.
      This lab will introduce you to the use of subroutine and parameter passing using the stack. You will write a subroutine which performs CRC calculation for parameters placed on the stack and will return the CRC value on the stack.
    • Lab 4 (PDF, 220 kB) UNIMPLEMENTED INSTRUCTIONS
      Reports are to be done individually and turned in during class on xxxx.
      This Programming Assignment will take the CRC computation program you wrote for Programming Assignment #2 and #3 and implement it as a 68000 assembly language instruction.
    • Lab 6 (PDF, 148 kB) EMBEDDED CONTROLLER
      Reports are to be done individually and turned in during class on xxxx.
      At various points throughout the course references have been made to the use of embedded microprocessors in appliances and other consumer products. In this lab you will implement a basic appliance controller for a deep fat fryer similar to those used at McDonald’s and other fast food chains foor cooking french fries. Your program will control the cooking of french fries according to two criteria: (1) elapsed time as measured by an interrupt driven clock, and (2) the temperature of the cooking oil as determined by a digital temperature sensor. Part (1) is required to get out of the final, Part (2) is extra credit.
      Appendix 1 (PDF, 108 kB) Programming the 68230 PIT
      Appendix 2 (PDF, 36 kB) Using the Analog-Digital Converter
      68230.com (TXT, 4 kB) Debugger command file to emulate the 68230 PIT

    Additional Programming Assignments

      We developed a number of excellent laboratories over the years. These labs ranged from computing the sine of a binary arguement using a look-up table and interpolation to an Asteroids game.

    • Lab (PDF, 158 kB) TABLE DRIVEN CRC CALCULATION:
      You wrote a program which computed the CRC for Lab #2 above. However, that is a very slow, inefficient way of calculating CRCs. A much faster algorithm uses table lookup.
    • Lab (PDF, 415 kB) INTERRUPT TIMED CLOCK
      This laboratory will introduce the student to the generation of interrupts (using a programmable timer), the handling of an interrupt, and the priority of interrupts. This laboratory will implement a digital clock using interrupts timed at 1/10th second intervals. A 68230 programmed interface/timer (PI/T) chip emulated by the debugger using debugger macros will be used to program the timer. Note that the 68230's interrupt MUST be reset by clearing the ZDS bit in the interrupt service routine. At the start of the program you should accept an input time (hours, minutes, seconds). Your program will consist of an interrupt service routine that will update the time and display it on the screen every 1/10-th of a second, i.e. HH:MM:SS.D.
    • Lab (PDF, 387 kB) TRIG FUNCTIONS
      This laboratory will implement an interpolation routine to compute the sine and cosine of an input binary number. Input will be from a data register. You will use an interpolation table to compute the sine of the angle; the cosine can be computed from the cosine since cos(x)=-sin(x-90 degrees). You will then display both results to the debugger screen.
    • Lab (PDF, 116 kB) SINE AND COSINE SUBROUTINES
      You developed a procedure for computing a fixed point sine function in Programming Assignment #4. In part 1 of this lab, you will convert that procedure into a subroutine which can be called from anywhere in your program. In part 2 you will implement a cosine function.
    • Lab (PDF, 229 kB) FLOATING POINT TANGENT AND DIVISION SUBROUTINES
      This laboratory has two programming components. The first is to convert your result from the sine function into a floating point number using a special simplified floating point format. For the second part of this lab you will develop a tangent function routine using this floating point sine and cosine format. This will require developing a floating point divide routine. Furthermore, you will need to monitor your division routine for possible numeric overflows during the calculation process.
    • Lab (PDF, 148 kB) SIGNAL PROCESSING
      This lab will introduce you to the use of the arithmetic instructions, arrays, various forms of indirect addressing, and a basic method of processing analog signals.
    • Lab (PDF, 160 kB) FLOATING POINT CONVERSION
      Your program will input a word length number x in signed magnitude notation, convert the number x into a special "floating point" representation of a number consisting of a mantissa and signed exponent and store it in memory.
    • Lab (PDF, 56 kB) GAME OF LIFE
      Write an assembly language program that simulates Conway’s Life. The simulation takes place on a rectangular array of cells, each of which may contain an organism. The survival and reproduction of organisms from generation to generation depend upon the number of neighbors according to simple rules. Write a subroutine DISPLAY that displays the current generation of Life. Write a main program that initializes the Life array to a random population and computes and displays Life one generation at a time.
    • Lab (PDF, 89 kB) RANDOM NUMBER GENERATION
      Write an assembly language program that generates a pseudo random number sequence using the linear congruential method. This method should be functionally identical to the routines SEED and RAND described on page 305 of Ford & Topp, Second Edition.

    Exams


    Programmer's Reference Card

      This is what you are allowed to use as a reference on all exams. Make sure you bring it with you to the exam and that you know how to use it

    • Programmers Reference Card (PDF, 2.62 MB)

    Useful Links

      Let me know of any interesting Microprocessor Web sites you come across!


    Created: 2004-12-30. Last Modified: 2004-12-30.