Lab1 - Lab 1 Report IET 645 Drew Henderson and Rick Wagoner...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
Lab 1 Report IET 645 Drew Henderson and Rick Wagoner Spring, 2006
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
The purpose of this lab was the introduction of the Motorola 68HC11 on the CME-11E9-EVBU development board from a hardware perspective, and to use assembly code to manipulate external devices; in this particular case, LED’s connected to the PORTB interface. Setup The board was placed into a single-chip mode, to allow writes only to occur to PORTB. Following the instructions in the handout, the anodes of four LED’s (from the front bin – the back bin contained blinking LED’s) were connected to PB0 – PB3 , with the cathodes connected to resisters (acting as current limiters), which were, in turn, connected to ground. For labs 12, 13, and 14, an additional four LED’s were added in the same manner, and connected to PB4 – PB7. The board was connected to the serial port on the PC, and was then connected to a power source (note: the power source was disconnected when adding the additional four LED’s.) Lab 1 The first lab consisted of the initial setup, then loading and compiling the provided demo program (see Lab 1 Flowchart and Lab 1 Source Code ), then uploading the compiled program (lab1.s19) to the development board, and beginning execution. These steps were accomplished via the AxIDE interface program on the PC. This program turns off all the LED’s, pauses, then turns them on, pauses, then repeats the cycle. The program code, itself, begins with instructions to equate the string “PORTB” with $1004, which is the address for port B on the board interface. The next instruction, ORG $0100, indicates that the next byte (i.e. the start of the program in this case) should be located at $0100. The rest of the program breaks down as follows: Main ldaa #$00 sets the label “Main”, and loads hexadecimal 00 (in immediate Mode) into the A register Staa PORTB stores the A register into PORTB, effectively turning off all LED’s Ldy #$FFFF loads hex FFFF into the Y register Delay1 dey labels “Delay1”, and decrements the Y register by 1 Bne Delay1 checks the value of the Z condition code register (e.g. if the “dey” instruction has not reduced the value in the Y register to zero, then go to Delay1) ldaa #$0F load $0F (%1111) into the A register staa PORTB store the value in register A into PORTB (e.g. write a ‘1’ to each of the first four lines (PB0 – PB3) on PORTB, effectively turning on all the LED’s. ldy
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 13

Lab1 - Lab 1 Report IET 645 Drew Henderson and Rick Wagoner...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online