Using counters and state machines, use one slide switch to either read the switches that would set the duty cycle (count up to value) or cause the PWM to be running. If the slide switch is a ‘0' then the design allows the user to set the PWM value. When the switch is a ‘1' then the PWM waveform is generated on an output and displayed on an oscilloscope.
a) Develop a design that at startup, the duty cycle is 50%. The base frequency is ~10KHz i.e. T_cycle = ~100us, regardless of the duty cycle.
b) Using the slide switches, the user shall be able to update the duty cycle e.g. update the T_on time. Remember the frequency time stays the same. Only the one time versus off time varies.