CSE477 Assignment Notes for Labs 1 and 2
- There are two main ways the EVB may be programmed: directly by using the
Buffalo assembler/disassembler or uploading assembled code
(Motorola S-records).
- In programming the 68HC11 directly, the assembler assumes all
numeric values are in hexidecimal. Therefore, any base designators
($, %, d) will cause an input error with direct programming.
- Writing code externally and assembling for upload provides for a
less cumbersome programming environment. However, the assembler
also has its quirks--white space must precede any instruction
mneumonic regardless of the existence of a label. If a line
begins with an instruction, the code will not assemble and errors
will be generated.
- Timing for all instructions is given with the instruction descriptions
in Appendix A of the Reference manual.
- The description and use of pseudo vectors in facilitating interrupts is
covered in 3-5 thru 3-6 of the EVB User's manual and 3-17 of the
reference manual. In short, each interrupt looks to a particular
unchangeable address when it is handled. It is up to the programmer
to place the opcode for a jump ($7E) followed by the starting address
of the service routine to handle the interrupt.
- Because the Buffalo program handles interactive communication with the
user, its interactive loop must be exited before another program can be
run. After uploading an assembled program, the EVB must be reset (using
the square red button) in order to exit the transfer loop used for the
upload. Only after this, can you run your uploaded program.
- Pages 3-2 thru 3-4 of the EVB User's Manual contain invaluable
information regarding utility subroutines that were included with the
Buffalo program. OUTA (used often in EX10.ASM of lab 2) is especially
useful in peppering buggy code with several "printf-like" statements to
help in the debugging process. A program that wants to use this routine
can simply use an EQUate statement for the starting address of the
routines (all addresses listed on page 3-4) and a simple JSR to
that routine will print out the character equivalent of the value in
Accumulator A.
- A break point (maximum of 4) will cause the program to pause
before that instruction is executed. Typing 'p' will resume
normal program execution.
- The first program used in the labs (from 4-27 in the EVB User's Manual)
is very valuable in showing basic serial communication techniques --
placing data in a transfer register and polling a status flag until the
TxD Register Empty flag is set, etc..
- The EVB board uses an 8MHz crystal resulting in a 2 MHz bus clock.
This value is needed in setting BAUD rates, as shown in Tables 9-1 and
9-2 of the Reference Manual.
- A pre-scalar is available in using input capture and output compare
routines. Fast 16-bit rollovers at 2MHz make this an attractive option
when slower timing is wanted and less precision is needed. Otherwise,
some other routines must be introduced to handle timer overflow.
Comments to: cse477-webmaster@cs.washington.edu (Last Update:
)