You are on page 1of 2

Standard single-purpose processors Peripherals

TASKS
1). Find the digital value of Vin if it is an 8-bit ADC and Vin = 7.65 V. Also given that
Vfull scale = 10 V.

2). A particular motor operates at 10 revolutions per second when its controlling
input voltage is 3.7 V. Assume that you are using a microcontroller with a PWM
whose output port can be set high (5 V) or low (0 V). (a) Compute the duty cycle
necessary to obtain 10 revolutions per second. (b) Provide values for a pulse
width and period that achieve this duty cycle. You do not need to consider
whether the frequency is too high or too low although the values should be
reasonable. There is no one correct answer.

3) Given a 100 MHz crystal-controlled oscillator and a 32-bit and any number of
16-bit terminal-count timers, design a real-time clock that outputs the date and
time down to milliseconds. You can ignore leap years. Draw a diagram and
indicate terminal-count values for all timers.

4). A watchdog timer that uses two cascaded 16-bit up-counters as in Figure 4.1
(d) is connected to an 11.981 MHz oscillator. A timeout should occur if the
function watchdog reset is not called within 5 minutes. What value should be
loaded into the up-counter pair when the function is called?

5)List the advantages of real time clocks vs non-real time clocks.

Hints
1)HINT: A digital signal can be compressed far more than an analog signal. ADC
allows this conversion to take place at an efficient rate in an embedded system.

2)a). 3.7V / 5V = .74 = 74% duty cycle

b)There can be many solutions


Example
If period = 100n
pulse width = .74 *period = 74 ns.

3)

4) period = 1 / (11.981 MHz) = 8.346548702e-8 s range = period * 2^32 =


8.346548702e-8 s * 2^32 = 358.4815371 s "time-out" = 5 min. * (60 s / 1 min.) =
300 s X = range – "time-out" = 358.4815371 s - 300 s = 58.4815371 s value loaded
= X / period = 58.4815371 s / 8.346548702e-8 s = 700667296

You might also like