This preview shows page 1. Sign up to view the full content.
Unformatted text preview: Preliminary Study Questions ECE 372 for midterm 1 march 11. Basic Questions What basic logic operators allow you to set, clear, and toggle bits? What is the basic organization of a C program. Where do includes go, variable, functions. What is the basic organization of an Assembly language program. Interrupt vectors? Comments? Organization of modern microcontrollers (See CH1 Cady) Explain the function of : ALU, Accumulators, Data Memory (RAM) and Program Memory (ROM) , and input/output modules. Define Opcode and operand. Understand how an instruction encodes opcode and operands. Define the condition registers/status register (in pic). How can it be used to control branching in a program? What are the 3 building blocks of structured programming? Where does an Interrupt fit into structured programming? Draw a generic program memory map for a microcontroller. Chapter 2 cady) Draw a generic data memory map for a microcontroller. Where are variables, constants, instructions and control registers (SFR) stored? Compare linear addressing versus banked addressing. Where are the GPR/ SFR located in the PIC? Show now to use table pointers and file pointers to manage arrays. Extended answer questions Draw a TTD for a simple application, i.e. an alarm clock. Write code (including stubs) for this diagram. Knowing the clock rate, that you are using a 16 bit timer, and that you have a prescale circuit, show how you would select the prescale value and the timer preload values for a given desired period or frequency. Draw a finite state machine for a simple application: i.e. A stop light. Write a switch statement, if statement and loop in assembly. Translate a FSM diagram into a switch statement (C or assembly) Illustrate how a circular buffer works.* Show how to do a fixed-point dot product of two N long vectors. Show how to implement an alpha filter in assembly using what you learned about fixedpoint representation. Suppose that you want your alpha to be a specific value such as .3145. Show your code in “C” and/or Assembly. Show how to use sleep mode to efficiently design a battery-powered alarm clock. * Write a PD control loop in assembly and/or c. Why is an estimator needed in a PD loop? Write an assembly language routine to (1) Send a PWM wave of 30 ms period to a LED (2) Modulate the duty cycle from 0 to 100% and back to 0% over one second. • • indicates new topics before exam. ...
View Full Document
- Spring '08