Week 1 Self-Evaluation Quiz Questions 1.[5] Give five basic differences between a uP and a uC?. 2.[1] Name one way in which the AVR architecture is “RISC-like”. 3.[1] Name an architectural feature that helps the AVR efficiently access RAM data space using “C”. 4.[1] What I/O instruction might you find in a microcontroller but not in a microprocessor? 5.[1] How many cycles does it take for the AVR to respond to an interrupt? 6.[3] Three serial interfaces on the mega128 are: 7.[3] Name three characteristics of ESD diodes. 8.[4] Using nothing but an ohmmeter, how could you check the ESD diodes on the input to an mega128? 9.[3] What does a makefile (Makefile) do? 10.[2] How does humidity effect ESD? 11.[2] What purpose do the synchronizers on the mega128 input pins serve? 12.[3] Other than size, what distinguishes TCNT0 from the other timers/counters? 13. For questions 13-15, see the link to the schematic on the web page. Assume port B is to be configured as follows: bit0 output,driven low bit1 input,pullup off bit2 output,driven low bit3 output,driven low bit4 output,driven high bit5 output,driven high bit6 input,pullup on bit7 input,pullup on [8] Fill in the bit values to configure DDRB and PORTB as described above: 7 6 5 4 3 2 1 0 --------------------------------- DDRB: | | | | | | | | | --------------------------------- 7 6 5 4 3 2 1 0 --------------------------------- PORTB: | | | | | | | | | --------------------------------- 14.[16] The connections to PORTB are shown in the linked schematic. Indicate by filling in each bit position of PINB the value that would be read well after 1.5 clock cycles using the bit assignments for PORTB and DDRB above. Possible PINB values are '0'(logic zero), '1' (logic 1), and 'U' (unknown). 7 6 5 4 3 2 1 0 --------------------------------- PINB: | | | | | | | | | --------------------------------- 15.[2] (circle one) LED1 is on/off; LED2 is on/off 16.[2] Explain the difference between a von_Neumann and Harvard CPU architecture. 17.[4] Briefly tell what the 4 AVR memory spaces are, what they are used for, and the characteristics for each. 18.[2] If we are creating a DC voltage from a PWM and we want it as free from AC components as possible, how would we choose the R and C elements as well as the PWM frequency? 19.[2] When an interrupt occurs, what CPU structure provides information to the program counter about where to begin execution next? 20.[2] Generally speaking, how many AVR instructions are executed in one second if the processor is running at 10Mhz? 21.[1] How many general purpose registers does the Mega128 have? 22.[2] Is the AVR a von-Neumann or Harvard architecture? How can you tell? 23.[1] The AVR program counter fetches instructions from what kind of memory? 24.[2] The mega128 ADC has how much resolution (bits)? 25.[1] What country was the AVR architecture born in? 26.[3] Name one environmental situation where a differential input to the ADC would be useful? 27.[1] How many timer/counters does the mega128 have? 28.[4] Considering our FM alarm clock radio design, why wouldn't it be wise to store the current volume and tuning settings in a flash memory location? 29.[2] What AVR peripheral would you use to create a PWM? 30.[3] Timer/Counter 1 is most like: a. Timer Counter 0 b. Timer Counter 2 c. Timer Counter 3 31.[4] What keeps the AVR from getting hung in a endless loop by an interrupt that is never serviced? 32.[2] When doing a A/D conversion, how can on-chip noise be reduced? 33.[2] Give two reasons why uC's usually don't have very high clock rates. 34.[2] Explain what the value of Vol(max) given in the datasheet tells us? 35.[2] Explain what the value of Voh(min) given in the datasheet tells us? 36.[4] Explain how power scales with voltage and clock speed in typical uCs (excluding deep submicron processes). 37.[4] Draw the simplified view of the AVR i/o port showing the ESD diodes, input buffer, resistive pullup and P channel transistor that controls the pullup resistor functionality. pullup resistor, etc. 38.[4] Explain the difference between a latch and a flip-flop. 39.[10] See the schematic link on the web page. For this problem, determine the values of Rb and Rd such that the current through the LED is 20mA given the conditions stated. 40.[3] While using an AVR uC, an input port is read immediately after writing it. Will you read what you wrote? Why? 41.[2] How many ESD events are the ESD diodes supposed to protect against? 42.[3] When an ESD event occurs, roughly (order of magnitude).... -how fast is the current rise time? -what is the peak current? -what is the voltage? 43.[4] Plot Vout(y-axis) versus Vin(x-axis) for a schmitt trigger inverter. Indicate where Vdd, ground, and any thresholds are. 44.[2] What is the condition of port A-G pins after reset? 45.[2] Can reset of the AVR occur if the clock is not running? Why do you think it was done that way? 46.[8] Draw the schematic diagram of how an AVR port pin could be used to actuate a 500 ohm relay coil using a PNP BJT with beta of 100 at 10mA. Show all resistor values. Assume the AVR can sink the required base current at 0.5 volts. BJT Vce(sat) is -0.2V, and Vbe is -0.7V. Don't forget to protect against flyback voltages.