EE346A Quiz #2 Name ___________________
Key ______
Frequency _____ Hz
Clock Frequency: 8MHz, 10MHz, 16MHz, 20MHz
Timer: T0, T1, T2, Custom ____ (default 12 bits)
IMPOTANT: Please read before you begin:
- Unless otherwise directed (see question 8), please provide base 10 answers using decimal notation (no powers of 2 or fractions 1/3). If not a whole number, you can limit written answers to three places past the decimal point. Please round up or down as needed (round 5 up). For example 62.4875 would be written as 62.488.
- Prefix hexadecimal digits using 0x notation.
- To avoid round-off errors later in the quiz, use the memory function on your calculator to save the answer to earlier (dependent) question.
- Always check your answers. When possible turn your answer into a question. For example, take your answer to question 9 and convert to a decimal number, the answer to question 8, to verify that conversion is correct. Using this approach you can also verify your answers to questions 6, 4, and 7.
Question | Answer | Units | ||
1 | How many bits is the Timer/Counter | bits | ||
2 | Assuming the counter is cleared (equal to 0), How many tics of the clock have occurred at the moment the overflow bit is set (for example for Timer 1 overflow bit is TOV1)? | tics | ||
3 | What is the period of the waveform? | msec | ||
4 | Assuming a 50% duty cycle, what delay should be programmed into the Timer/Counter? | msec | ||
5 | What clock prescalar should be selected (1, 8, 64, 256, and 1024)? | |||
6 | Assuming this prescalar value, how many microseconds does it take for 1 tic of the clock? | µsec | ||
7 | What is the maximum delay that can be generated by this delay? | msec | ||
8 | What whole number (positive interger) should be preloaded into the Timer/Counter register(s) to generate the desired delay in decimal? | Base 10 | ||
9 | What value should be preloaded into the Timer/Counter register(s) to generate the desired delay in hexadecimal? | Base 16 | ||
10 | What assembly instruction opcode mnemonic (do not include operands) would you use to load this constant into register r16? | |||
Show all your work here and on the back of this page.