ECEN 3213 Fall 2004 Lab Assignment #1

You have two weeks to work on this lab (actually longer on the calendar, however, because the Monday sections don't meet on Labor day this is two lab meetings for them). This lab is due at the end of your assigned lab period the week of September 13th. Note this is a simple lab, so you should be able to complete it in one session.


For the first lab run the five tutorials for the 6811, that is tut.RTF, tut1.RTF, tut2.RTF, tut3.RTF, tut4.RTF, and tut5.RTF The objective is to become familiar with the simulator. Look at the documentation on the CD before showing up at the lab. In the lab read the help files that are with the simulator. Show the instructor that you can both assemble (that is run the assembler) and run the program. You should change the source just a little bit to see what error messages occur.

Then open the simulator with tut2.RTF and type in the following Assembly program (of course change the name and date), Save it to your floppy, assemble it, run it and submit it on the web submission page.
* ECEN 3213 Fall 2004 Lab 1
* Name: John M. Acken
* Date: 25 August 2004
* Description: This program simply outputs to the serial
* Port values that are stored in memory.
*
        org $D000 object code goes in ROM
Main ldaa #$0c
        staa SCCR2 enable SCI
        ldaa #0
        staa BAUD baud rate=125000 bps
loop ldx #$B600
******************** Output to serial PORT *
JMALoop ldaa ,X Next ASCII character from string
        inx
        cmpa #$00
        beq pause
* Output next byte
JoutWait ldab SCSR
        andb #$80
        beq JoutWait Gadfly wait for TDRE
* TDRE=1 when ready for more output
        staa SCDR Start Output
        bra JMALoop
pause ldaa #$00
        stop
        bra loop
**** Values are in EPROM ***************
        org $B600
        fcb $57,$65,$6C,$63,$6F,$6D,$65,$20
        fcb $74,$6F,$20,$45,$43,$45,$4E,$20
        fcb $33,$32,$31,$33,$20,$20
        fcb $20,$3A,$2D,$29,$20,$0D,$0D,$00
************ give names to Serial PORT registers ****
BAUD equ $102b ;serial baud rate control
SCCR1 equ $102c ;serial control register 1
SCCR2 equ $102d ;serial control register 2
SCSR equ $102e ;serial status register
SCDR equ $102f ;serial data register
***** Set the RESET interrupt vector register ***
        org $FFFE
        fdb Main Start location after reset
        end


[ECEN3213] [Announcements] [Schedule] [Syllabus] [Assignments]

Feel free to email comments and suggestions to acken@okstate.edu

Red Stars red