t6060
Newbie level 1
- Joined
- Apr 2, 2014
- Messages
- 1
- Helped
- 0
- Reputation
- 0
- Reaction score
- 0
- Trophy points
- 1
- Activity points
- 8
Can anyone help me to answer these questions about PIC18 Microcontroller??
1. 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’.
2. 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!
1. 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’.
2. 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!