Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

1. True or false. The PWM waveform of desired duty cycle is generated through se

ID: 2249250 • Letter: 1

Question

1. True or false. The PWM waveform of desired duty cycle is generated through setting up the hardware and will not slow down other works of the processor.

Answer:

2. True or false. A driver is required between the microcontroller and the DC motor.

Answer:

3. True or false. The ATmega328 has 6 PWM input pins.

Answer:

4. True or false. All 6 PWM pins of ATmega328 pins of PORT C.

Answer:

5. True or false. In Fast PWM and Phase correct PWM modes, we can change the duty cycle.

Answer:

6. True or false. For 8-bit timers, in Phase correct PWM mode, the period is 510 clocks.

Answer:

7. True or false. In Fast PWM, phase does not change when the duty cycle is changed.

Answer:

8. True or false. We can associate each of the pins with each of the waveform generators.

Answer:

9. True or false. In PWM modes (Fast PWM and Phase correct PWM) we can change the duty cycle of the generated wave.

Answer:

Questions 10-12 refer to the program below, which monitors the status of the switch and perform the following: (a) If PORTA.7 = 1, the DC motor moves with 25% duty cycle pulse; (b) If PORTA.7 = 0, the DC motor moves with 50% duty cycle pulse.

Line A: #include "avr/io.h"

Line B: int main ( )

Line C: {

Line D:       DDRB = 0x08;

Line E:       PORTA = 0x80;

Line F:       TCCR0 = 0x73; //Phase corrected PWM,

                                          // inverted, n=64

Line G:       while (1)

Line H:            {

Line I:               switch ((PINA&0x80))

Line J:               {

Line K:                         case 0: OCR0 = 64; break;

Line L:                         case 1: OCR0 = 127; break;

Line M:             }

Line N:             }

Line O:             return 0;

Line P: }

10. Which timer is used by the program?

Answer:

11. In the comment for line F, what does “n=64” mean?

Answer:

12. In Line K, why “OCR0 = 64” (where does the value 64 come from?)

Answer:

Explanation / Answer

The PWM waveform of desired duty cycle is generated through setting up the hardware and will not slow down other works of the processor

true

A driver is required between the microcontroller and the DC motor

true

The ATmega328 has 6 PWM input pins

true

Arduino Duemilanove. The Arduino Duemilanove ("2009") is a microcontroller board based on the ATmega328 (datasheet). It has 14 digital input/output pins (of which 6 can be used as PWM outputs), 6 analog inputs, a 16 MHz crystal oscillator, a USB connection, a power jack, an ICSP header, and a reset button

All 6 PWM pins of ATmega328 pins of PORT C.

false

In Fast PWM and Phase correct PWM modes, we can change the duty cycle

false

We can associate each of the pins with each of the waveform generators

true

In PWM modes (Fast PWM and Phase correct PWM) we can change the duty cycle of the generated wave

true

Which timer is used by the program

AVR timers