68K Laboratory 2 -- Demonstrating the COFFEEPOT device operation on the 68K simulator

If you have not already done so, you should apply the necessary MAGIC to prepare the SDS simulator for the virtual device operation.

We can now check whether the "MAGIC" took.

  1. Getting the necessary files installed in 68K lab2 directory
  2. Activate the SDS 68K simulator.
  3. Use the WINDOW | COMMAND menu option, bring up a COMMAND window.

    cd c:\68k\lab2 or equivalent to reach your laboratory.

    This is not necessary if you have set your StartupI directory to your 68K lab2 directory.

  4. For those of you who want to find out all the gory details of the running the virtual devices on the SDS simulator there is some hidden MAGIC associated with interrupt handling has occurred inside the sstep.ini file. Those not interested in the details, WAIL (Worry about it later.)
  5. You are now ready to run the test program for the 68K COFFEEPOT virtual device.

COFFEEPOT virtual device and SDS simulator set-up test

If the "MAGIC" worked you should get a Welcome to the 68K COFFEEPOT simulation message inside the Command window. If it did not, then recheck that you installed enough MAGIC to prepare the SDS simulator for the virtual device operation.

Dismiss the Command window and bring up the Watch window. In that you should see a series of internal memory values.

Activate the Run | GO option and stand back. Depending on the speed of your PC you may have to wait for a minute or so before you see the final result of the test program on the screen in the Watch window.


What you should have seen

The COFFEEPOT demo program performed the assembly language instructions for the operations described in the following pseudo-code. The program essentially installs and initializes (RESETS) the COFFEEPOT device, and then tests the operation of each of the COFFEEPOT device registers.

The pseudo code for the operation is

	Install Coffee Pot on Address and Data Busses
	Send RESET signal to the COFFEEPOT CONTROL register
	SendMessage("Have tested CONTROL register WRITE operation)
	Send WATER_ON signal to the COFFEEPOT WATER register
	SendMessage("Have tested WATER register WRITE operation)
	SendMessage("Testing HEAT register WRITE operation)
	Send HEAT signal to the COFFEEPOT HEAT register
	SendMessage("Testing TEMPERATURE register READ operation)
	Read "temperature" value from COFFEEPOT TEMPERATURE register
	SendMessage("Testing TIMER register READ operation
	Read "time" value from COFFEEPOT TIMER register
	Send TURNOFF signal (anything except a RESET value) to CONTROL register

The following table shows the basic animation sequence

Basic animation sequence

Stepping through the COFFEEPOT Test

In order to see the action of the COFFEEPOT test in more detail you need to do the following.

Look in the Watch window as you now issue the GO command after resetting the simulator. You should see the result (in the variable screen in the Watch window) as each register in the COFFEEPOT is tested. When the simulator reaches the breakpoint, it will pause for a second and then move on.

Try modifing the breakpoint control so that the processor stops rather than hesitates at the breakpoint (see Help menu option).


Next Step

You are now ready to move onto your portion of Laboratory 2 where you must prepare the necessary assembly language instructions to control the COFFEEPOT in the manner suggested in the COFFEEPOT data sheets



Last modified: July 22, 1996 01:12 PM by M. Smith.
Copyright -- M. R. Smith