Homework 4 UCR EE/CS120B: Intro. to Embedded Systems Fall Quarter 2002, Prof. F. Vahid Due Tuesday Nov 26 at beginning of lecture 1. A particular pulse-width modulator that comes with a microcontroller generates a pulse with a high of 3 V and a low of 0 V. The maximum period is 1 millisecond, and minimum period is 1 microsecond. Assume the period and duty cycle can be set in C by writing to global variables "period" and "dutycycle." Write a subroutine called PWM_GenerateAvgVoltage(float V) that takes a parameter V indicating the desired average output voltage, and sets the period and duty cycle variables of the PWM appropriately. 2. ESD 4.2 (watchdog timers), but within 3 minutes rather than 5 minutes. 3. ESD 4.10 (stepper motor control), but forward 20 and backward 10. 4. ESD 4.12, (analog-digital encoding), but for a voltage range of 0 to 5 V, and for a 12-bit digital encoding. 5. ESD 4.15 (analog-digital encoding), but for a 12-bit digital encoding. 6. ESD 5.6 (composing memory) 7. ESD 5.10 (cache access rate) 8. ESD 6.2 (port/bus-based I/O) 9. ESD 6.3 (extended parallel I/O)