This preview has intentionally blurred sections. Sign up to view the full version.View Full Document
Unformatted text preview: Su, Andy – Homework 5 – Due: Oct 12 2007, 11:00 pm – Inst: Valvano 1 This print-out should have 15 questions. Multiple-choice questions may continue on the next column or page – find all choices before answering. The due time is Central time. Homework 5 001 (part 1 of 1) 10 points Which of the following statements best de- scribes a device driver ? 1. A device driver is a collection of software functions that allow higher level software to utilize an I/O device. 2. A device driver is a set of programs that facilitate the use of an I/O device. 3. A device driver provides both functional abstraction and complexity abstraction of the I/O process. 4. A device driver is used to separate mech- anism from policy with respect to I/O opera- tion. 5. All of these choices are correct. correct 6. A device driver is a set of low-level func- tions that input/output directly with the hardware are grouped together in a single module. Explanation: All of these descriptions are correct. 002 (part 1 of 1) 10 points Which term best describes a computer where the software accesses I/O ports in the same manner as it accesses memory? 1. Hardware abstraction layer. 2. Memory mapped. correct 3. I/O mapped. 4. Embedded system. 5. Isolated I/O. 6. none of these choices is correct Explanation: The 6811 and 6812 are memory-mapped computers because the hardware/software ac- cess to an I/O port is similar to a regular memory access. For example, on the 9S12C32 the following code reads PTT and writes to PTM, ldaa $0240 from PTT staa $0250 to PTM while this very similar code reads from memory location $3800 and writes to mem- ory location $3801, ldaa $3800 from memory staa $3801 to memory The only difference is the address used. 003 (part 1 of 1) 10 points Which answer best describes the procedure one follows to configure a single port pin as an input? 1. The initialization program sets the 8-bit direction register to 0. 2. The initialization program sets the corre- sponding bit in the direction register to 1. 3. The initialization program sets the 8-bit direction register to $FF. 4. The initialization program sets the corre- sponding bit in the data register to 0. 5. The initialization program sets the corre- sponding bit in the data register to 1. 6. The pins on the 6812 are predetermined as either input or output, so one simply uses one of the input pins. 7. The initialization program sets the cor- responding bit in the direction register to 0. correct Explanation: For example if you wanted to make PORTT bit 3 an input, then you would execute Su, Andy – Homework 5 – Due: Oct 12 2007, 11:00 pm – Inst: Valvano 2 ldaa DDRT friendly anda #$ F 7 clear bit 3 staa DDRT PT 3 = input 004 (part 1 of 1) 10 points Which answer best describes the procedure one follows to configure a single port pin as an output? For example, we wish to make PT2 an output....
View Full Document
This note was uploaded on 04/26/2009 for the course EE 302 taught by Professor Mccann during the Fall '06 term at University of Texas.
- Fall '06
- Electrical Engineering