...
Only 10 of the bits read from the ADC contain useful data (LSB/MSB determines which bits), the rest will need to be ignored.
The ADC digital value will range from the maximum to minimum value 10 bits can hold.
(What is the largest number that 10 bits can hold?)
The timer will need to be started only once in the program.
Remember that the duty cycle must range from 5-10% of the total period or 1-2ms of on time and the ADC value will need to be converted to counts.
Additional Resource:
Best Practices
For the Firmware team we follow a naming and code style guide to make our code more uniform and readable
...