CE121L - Microprocessor System Design
Laboratory 3
Week of January 27, 1997

In this lab, you will add memory to your system, both EEPROM and RAM. You will also write a small program using the assembler to test your system. There is an HC11 assembler as well as a a friendly guide to the quirks of programming the HC11 in the /cats/cmpe121 locker --4s there's more on the misinformation interstate. We'll have an assembler installed in the lab as well for use in ``burning in'' your programs. Looking forward, you may wish to start hooking up the RS-232C level converters. Be quite careful with these, as they produce high voltage signals which can fry other chips.

Prelab

  1. Read the reference manual, especially sections 3 and 5, and the introduction to HC11 programming.
  2. Design the memory interface for your system. Include timing diagrams that take into account decoding and other delays. Partial address decoding will simplify your design. Be sure to place the EEPROM at the top of your address space. If you don't know why, read the HC11 manual.
  3. In lab, you will install the EEPROM and the RAM and test the system.
  4. Write a short EEPROM program for testing the system. Note that you need to place the initial PC (and two more values - which?) in the EEPROM as well as your program. Your initialization program should set the stack pointer and the various HC11 configuration registers. You should tie one of the parallel ports (not one you'll need latter!!) to LEDs or to two 7-segment displays (in the vending machines). This will let you write numbers out to the real world during your program. The assembler in the /cats/cmpe121 locker can be used to debug syntax errors.

Laboratory

  1. Complete switch and display hookup and test from Laboratory 2.
  2. Install your EEPROM and LEDs.
  3. Assemble a simple program that will put a certain value on the LEDs. Load it into the EEPROM and give it a try. You may also wish to hook up one of the I/O pins as an input, so that you can give the HC11 inputs from a (debounced; see section 6.3.3 of the text) switch.
  4. Wire the SRAM in.
  5. Run a test program that steps through all of SRAM, writing successive numbers in successive locations in one pass, and then reads them all out again in the next, and indicates on the LEDs whether or not the test succeeded. Remove (or disconnect) the SRAM and run again to ensure your test routine worked.



Richard Hughey
Thu Jan 23 17:45:28 PST 1997