Objective: The student will become familiar or re-familiarize oneself with the 68HCS12 and Dragon12-Plus evaluation board, and the tool set, and write a first program.
This is an optional, ungraded assignment.
Equipment and Software needed:
Create a folder on the hard drive for your use, and put copies of all the indicated source files in that directory. Copy all the source files to a floppy at the end of the lab, so you will be sure to have them available next time! Do not rely on files still being on the class computer at the next session!
Use the instructons provided with the board (and on this CD) to install the USB to RS232 converter driver on the computer. Connect the Dragon12 to the power supply and verify that the LCD display says "EVB Mode". If you are using the ASMIDE, start it and make sure configuration is set to 9600bps, 8 bits data, no parity, and software handshake. Open the terminal window and hit the "Enter" key. The Dragon12 should respond with the D-Bug12 prompt. D-Bug12 is the debugger program which runs on the 68HCS12.
In the 68HCS12 on the Dragon12, the I/O registers start at location 0, internal RAM starts at $1000, and can be used through $3BFF (the remainder is reserved by D-Bug12). We usually have data located at $1000 and up, and the program starting at $2000 and up. There is EEPROM is at $0400-$0FFF. This will be used by your project for code at the end of this course. The D-Bug12 and bootloader are in Flash ROM at locations $4000 through $FFFF which includes the interrupt vector table. The interrupt vector table is mirrored into RAM for use in our programs. The addresses are defined in file REGISTER.INC.
The program in file EXERC1D.ASM will serve as our test case for checking the design path. Examine the program and determine what it does. The file uses a #include statement to incorporate REGISTERS.INC, which contains EQU statements for all the I/O registers, RAM memory areas, and the entry points into the D-Bug12 monitor.
Assemble EXERC1D.ASM using AS12.EXE, the assembler, either from the command line or within ASMIDE. This will create a file EXERC1D.S19. From the terminal program, execute the D-Bug12 "LOAD" command, and then instruct the terminal program to send the EXERC1D.S19 file. In ASMIDE, there is a menu item and button which initiate sending the file.
Using the disassembler in the debugger (the ASM command will disassemble), verify the program has loaded correctly.
Use the debugger to set a breakpoint at the start of the loop. Run to the breakpoint and then single step. Verify correct operation.
Repeat the process using the 68HCS12 Simulator. Start the simulator program in student mode, load the EXERC1.S19 file, and step through the execution.
To turn in: