Can anyone help me to answer these questions about PIC18 Microcontroller??
-
Determine the appropriate prescaler and postscaler of Timer2 you should use to generate a square wave with 50Hz frequency and with 50% duty cycle if PR2 is set to d’124’ and TMR2 is initialized to d’0’.
-
(20 marks) Write a program that uses Timer2 with PR2 set to d’124’ to generate a square wave with 50Hz frequency and with 50% duty cycle on pin 5 of Port B.
Thanks!