1 minute read

REVIEW QUESTIONS

Next Article
7.7 DC Motor

7.7 DC Motor

REVIEW QUESTIONS

1. Find the PR2 value and the suitable prescaler to get the following PWM frequencies.

Advertisement

Assume XTAL = 20 MHz. Available prescaler is 1, 4 and 16.

a. kHz

b. kHz

b. 78.125 kHz

2. Build a program to generate a 2.5 kHz PWM with a 70% DC on the CCP1 pin by using 4

prescaler and Fosc = 20 MHz.

3. Design an embedded system complete with programming in C, which can be used to

demonstrate a LED dimmer using internal PWM in PIC microcontroller. Schematic

sketching must include a LED that is connected to the output of a CCP pin through a

resistor to limit the current and two Push Button that act as switches to adjust the

PWM duty cycle. The first switch is used to increase the duty cycle and the second

switch is used to decrease the duty cycle. Set PWM period to 1 kHz with external OSC

at 20 MHz.

This article is from: