Question: You need Timer2 to create a 50% duty cycle square wave at PORTC0. The square wave must have a frequency of 100Hz. Assume that the

You need Timer2 to create a 50% duty cycle square wave at PORTC0. The square wave must have a frequency of 100Hz. Assume that the MCU is clocked at 2MHz. Assume a pre-scaler of 4.

Answer the following questions:

  • How many ticks of the clock are needed before the flag is raised? (write your answer in decimal)
  • What is the most appropriate post-scaler? (write your answer in decimal)
  • What would it be the value of register PR2? (write your answer in decimal)
  • How would you configure register T2CON so that Timer2 operates as described above? (write your answer in hexadecimal using format "0xnn")

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!