| |||||||||
| 9600 | baud rate |
| 8 | data bits |
| 1 | stop bit |
| 0 | parity bits |
NOTE THAT IN THE PAST THIS LAB HAS TAKEN A LONG TIME TO COMPLETE; MAKE SURE THAT YOU COME PROPERLY PREPARED.
Produce clean, annotated listings of all your programs. Currently, the maximum baud rate commonly used is 19,200. Calculate the overhead (i.e., percentage of time a computer is engaged in a task) for acceptance of characters and storage in a buffer for inputs of this speed. Would it make sense to make your character-accept program interrupt-driven? (Don't forget to include interrupt-processing overhead). What is the maximum feasible baud rate for a HC11-VDK board?
Here's the setup for the printing program:
ldx #DUART
ldaa %#00000001 * generate ints. from TxRDY
staa IMR,X
ldaa #%00001011 * set 9600 baud transmitting
staa CSRA,X
ldaa #%01100000 * Choose external clock
staa ACR,X
ldaa #%00010110 * Force pointer to MR1, Enable
staa CRA,X * the transmitter only
ldaa #%00010011 * Set mode to 8 bits, no parity
staa MRA,X
ldaa #%00001000 * Set stop bits
staa MRA,X
And for the receiving program:
ldx #DUART
ldaa %#00000000 * generate ints. from TxRDY
staa IMR,X
ldaa #%10110000 * set 9600 baud receiving
staa CSRA,X
ldaa #%01100000 * Choose external clock
staa ACR,X
ldaa #%00011001 * Force pointer to MR1, Enable
staa CRA,X * the receiver only
ldaa #%00010011 * Set mode to 8 bits, no parity
staa MRA,X
ldaa #%00001000 * Set stop bits
staa MRA,X
Recall that in the receiving program, you will not use interrupts. Instead, your subroutine must poll the status bit of the receive hold register. Don't forget to check the status flag for TxRDY when you enter the ISR as follows:
irqisr
ldx #DUART
ldaa SRA,X
anda #%00000100 * check the status flag
beq return
.
.
.
| EE-218 Homepage | Syllabus | Schedule | Lab News | Faculty | Contact Information | Lab Info | Project |
Department of Electrical Engineering and Computer Science
Box 1824 Station B
Nashville, TN 37235
Phone: 322-2771
Fax: 343-6702
| Search | Site Index | People Finder | Phone Directory | VUnet | VUmail | VU Library | Help |
Last Updated: Saturday, March 05, 2005
Juan J. Rodriguez-Moscoso
Copyright © 2003
Vanderbilt University