DOC PREVIEW
UNCC ECGR 4101 - Midterm Exam

This preview shows page 1 out of 4 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 4 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 4 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

ECGR 4101/5101 - Midterm Exam Page 1 of 4 UNC Charlotte–ECGR4101/5101-Midterm Exam –10/05/06 You are permitted 75 minutes to take this test, no more. This is an open book/open notes test. You are allowed the following items for the test: books, notes, homework, labs, pencils and erasers. You are not permitted to have any of the following on your desk during the test: computer, cell phone, calculator or other electronic assistance. Failure to abide by this policy will result in a zero for the test and a visit to the UNC Charlotte honor board. Put your answers on the answer sheet - use only that paper. Turn in the answer sheet at the end of the test. You may keep this test booklet. Multiple Choice - Questions 1-25: Each of these multiple choice questions is worth 4 points for a correct answer, 0 points for an incorrect answer. Circle your answers on the bubble sheet. CHOOSE THE BEST ANSWER IF TWO OR MORE ANSWERS ARE POSSIBLE. 1) According the ECGR4101 programming standards, which of the following should be included in the header of a subroutine? a. Subroutine name d. Interfaces b. Assumptions e. All of the above c. Inputs/Outputs 2) MCU can run in three modes: single chip, memory expansion, microprocessor modes. If used in single-chip mode what areas in memory could be addressed? a. Only internal areas (SFR, internal RAM, internal ROM) b. Internal areas (SFR, internal RAM, internal ROM) and external memory areas c. SFR, internal RAM and external memory d. SFR, external memory e. Only external memory 3) How is the char b in the code at the right passed to the function choosechar(a,b)? a. Stack d. R1H b. R1L e. R2 c. R1 f. None of the above 4) How is the int d passed in the function dothemath(c,d)? a. Stack d. R1H b. R1L e. R2 c. R1 f. None of the above main(){ char a = ‘x’; char b = ‘a’; char new; int d = 5; float c = 3.14; float result; new = choosechar(a,b); result = dothemath(c,d); } 5) Examine the assembly code at the right. This code corresponds to what C code? a. for(i=0; i<15; i++) x=x+2; b. when(x=0) x=x+2; c. x=0; while (x<16) x=x+2; d. x=0; x=x+2; e. switch(x) case 1: x=x+2; mov.w #0000H, -6[FB] L11: cmp.w #0010H, -6[FB] jge L12 add.w #0002H, -6[FB] jmp L11 L12: 6) What is the number of address bits required to address any byte in a memory that contains 65536 bytes? a. 2 b. 8 c. 12 d. 16 e. 20 7) How many bits does Frame Base register consist of? a. 8 b. 10 c. 12 d. 16 e. 20ECGR 4101/5101 - Midterm Exam Page 2 of 4 Batteries To LED 8) For our processor and compiler, how many bytes are required to represent the data type: char ? a. 1 b. 2 c. 3 d. 4 e. 8 9) For our processor and compiler, how many bytes are required to represent the data type: int ? a. 1 b. 2 c. 3 d. 4 e. 8 10) For our processor and compiler, how many bytes are required to represent the data type: short ? a. 1 b. 2 c. 3 d. 4 e. 8 11) For our processor and compiler, how many bytes are required to represent the data type: long ? a. 1 b. 2 c. 3 d. 4 e. 8 12) For our processor and compiler, how many bytes are required to represent the data type: float ? a. 1 b. 2 c. 3 d. 4 e. 8 13) You have several 400mAh 1.3V batteries and a LED that has an average drain of 4.0 mA at 5.0 to 5.5 V. If you had the following battery configuration how long would the LED stay lit? a. 100.0 hours b. 200.0 hours c. 166.6 hours d. None of the values above e. None of the above – the configuration will not correctly light the LED 14) Which register is used as a pointer to access the automatic variables in the current activation record/stack frame? a. SP b. PC c. FB d. FP e. AV 15) For our processor and compiler, does the stack grow toward larger or smaller addresses? a. Larger d. Neither b. Smaller e. None of the above c. Both 16) How much of the total address space for our class microcontroller used on our SKP board is not used for ANYTHING? a. 31 Kbytes b. 384 Kbytes c. 604 Kbytes d. 1024 Kbytes e. None of the above 17) Which of the following fully describes the outcome of the code at the right? a. Add all the numbers from 0 to 100 and put the result in sum. b. Add all the odd numbers from 0 to 100 and put the result in sum. c. Add all the even numbers from 0 to 100 and put the result in sum. d. Add all the odd numbers from N to 100 and put the result in sum. e. Add all the even numbers from N to 100 and put the result in sum. int i,sum; sum = 0; i = 0; for(i=N;i<100;i++){ if((i % 2)) sum += i; } 18) What is the CMM (Capability Maturity Model)? a. It is the standard by which engineers can plan product designs. b. This model measures the usefulness of a software program on a scale of 1 to 5. c. The model scales companies by their ability to produce a product in an organized and timely manner. d. This model describes how long a piece of software has been around. e. It is a model that attempts to project the amount of time a particular product will last before breaking down.ECGR 4101/5101 - Midterm Exam Page 3 of 4 19) If we sample input frequency Fi at a sample rate of Fi what will the resulting signal look like? a. Fi b. (Fi)2 c. 2 * Fi d. a horizontal line e. a vertical line Match the packaging description below with the labeled picture. 20) ____ DIP (Dual In-Line Package) A 21) ____ DFP (Dual Flat Pack) B 22) ____ QFP (Quad Flat Pack) C 23) ____ BGA (Ball Grid Array) D 24) Which of the following packaging types is used in the Furby you examined in lab? a. DIP b. DFP c. Wirebond d. all the above e. none of the above 25) Which of the following does the sfr62p.h file do? a. Identify the address location of ports and associate them with mnemonic names. b. Initialize the stack pointer c. Set all digital general purpose I/Os to inputs d. Define the location of ROM and RAM e. Set up the variable interrupt vector table Written Answer 26) What area of Flash is available for the user program on the SKP30262 board, assuming the monitor program is still used? List the range of addresses and exact size in bytes (not k bytes). (5 points) 27) Given the following information of a particular analog to digital converter, determine the value of the digitally represented voltage


View Full Document

UNCC ECGR 4101 - Midterm Exam

Documents in this Course
Load more
Download Midterm Exam
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Midterm Exam and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Midterm Exam 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?