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

Problem 2. Again consider the Type B timer modules of the PIC32, with 16-bit Syn

ID: 3871934 • Letter: P

Question

Problem 2. Again consider the Type B timer modules of the PIC32, with 16-bit Synchronous Clock Counter Mode and a peripheral-bus clock frequency of fescs 10 MHz. If possible, find good choices for D and P in order to generate the roll- over frequencies listed below. For each case, report the expected error in roll-over frequency. Calculate the error as a signed value, using your computed frequency of roll-over minus the desired fResoer Your goal is to select values for D and P that minimize the magnitude of error for each case. a) Desired frequency. faua s-2 Hz. D R= b) Desired frequency: fR 4 Hz. DP- c) Desired frequency: faiee 500 Hz. D d) Desired frequency: faunsc-20000 Hz. D- Error = Error = Error = P- Error =

Explanation / Answer

error= Frollover - Fdesired

a. Desired frequency: Frollover = 2 HZ.

here D represent the user-selected prescale value(either 1, 2, 4, 8, 16, 32, 64, or 256)

so calculate D= 1

here P represent the value in  the period register (PRx).

so, P=2

error= 2-1= 1

b. Desired frequency: Frollover = 4 HZ.

D=2

P=2

Error= 4-4= 0

c. Desired frequency: Frollover =500 HZ.

D= 8

P=2

error= 500-512= -12

d.  Desired frequency: Frollover =20000HZ.

D=16

P=2

error= 20000-65536= -45536

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote