Date: Mon, 02 Dec 1996 15:00:00 GMT Server: NCSA/1.4.2 Content-type: text/html CSE477 Laboratory Assignment #1

CSE477: Digital Systems Design

Steve Burns, Spring 1996


Lab 1

Introduction to the M68HC11EVB: Using the Evaluation Board to Debug Microcontroller Programs

Distributed: April 3 - Complete By: April 12


Objectives

When you have completed this lab, you should know how to:

Part 1: Powering up the EVB and connecting it to the PC

You will need to supply power to the evaluation board through the power supply connected to your protoboard. Four lines are needed: +12, -12, +5, and GND. The supply lines are clearly marked on the power supply name plate and the EVB. Make sure they are connected properly before plugging in the power supply. (If you exchange +12 and -12, or +12 and +5, or even +5 and GND, some damage will occur to the EVB. Don't do this. You will be responsible for this sort of damage.)

The serial line from the PC should be connected to the terminal port on the EVB (the RS-232 connector furthest away from the red reset button.) To communicate with the EVB, run the terminal emulation program residing at: C:\WINNT35\system32\TERMINAL.EXE . You will need to configure the baud rate to be 9600 (under the Settings->Communications panel). Flow control should be set to "None" on this panel. Then enter the Settings->Text Transfers panel and set the Flow Control radio button to "Line at a Time". The "Delay Between Lines" value should be set to "1/10" of a second.

Now plug in the power supply, and press the red reset button on the EVB. A prompt should be sent to the terminal program and displayed on the PC's screen. It should read:

BUFFALO 2.5 (ext) - Bit User Fast Friendly Aid to Logical Operation
Pressing return twice should list a bunch on commands that the EVB and BUFFALO can be asked to perform.

Part 2: BUFFALO Tutorial

Read Section 4.7 of your EVB user manual. Type in the assembly code on pages 4-27 and 4-28. Then issue the commands lists on page 4-29. (Remember to connect Pins 20 and 21 together on connector P1. This connects the TxD and the RxD lines of the SCI together. The example program will not work correctly if this connection is not made.)

Part 3: Assembly Language Program

Devise an assembly language program to turn a port bit on and off with a cycle period of one second. I suggest using port bit PB0. To get started, download the following sample program to the EVB. It just turns on this port bit. Then modify it for your needs.
	ORG $C000
	LDAA #$01
	STAA $1004
Type this program in using "notepad" and run the assembler that is located at "T:\cse477\buffalo\as11.exe". Run the assembler using the file manager's RUN command and the assembly program's name as its only argument. To load the assembled file to the EVB, you need to perform a text Transfer using the terminal emulator. First type
LOAD T
at the BUFFALO prompt and then pull down the Transfers->Send Text File panel. Select the file generated by the assembler (it has the extension .S19) and click the OK button. Your program should now be loaded into the EVB. Press the red reset button to restart BUFFALO. (I don't know why you need to do this.)

To actually run these two instructions, first set a breakpoint after the last instruction (use the BUFFALO "BR C005" command) and then enter "G C000". You be able to observe that PB0 is set to 1. (The other bits of port B have been cleared.)

What to Turn In

Turn in the assembly program that makes the port bit turn on and off with a cycle period of one second.

burns@cs.washington.edu