abuhafss
- 9th February 2014, 18:20
Hi Everyody
I am a newbie to PIC programming. In fact, just playing with LEDs to learn control of outputs.
I could not understand the term "CYCLE" used with command PWM. Can somebody spare a few moments to explain it?
Example:
a) Output required at pin B1, 10% duty cycle and frequency 410kHz - only internal oscillator 8MHz
b) Output required at pin B1, 10% duty cycle and frequency 410kHz - external oscillator 8MHz
c) Output required at pin B1, 10% duty cycle and frequency 410kHz - external oscillator 20MHz
I understand how to direct output to a particular pin and calculate the duty cycle. I just could not understand how to work out CYCLES for a particular frequency of the output pulse train against the frequency of the internal/external oscillator of a PIC.
Thanks for the help.
I am a newbie to PIC programming. In fact, just playing with LEDs to learn control of outputs.
I could not understand the term "CYCLE" used with command PWM. Can somebody spare a few moments to explain it?
Example:
a) Output required at pin B1, 10% duty cycle and frequency 410kHz - only internal oscillator 8MHz
b) Output required at pin B1, 10% duty cycle and frequency 410kHz - external oscillator 8MHz
c) Output required at pin B1, 10% duty cycle and frequency 410kHz - external oscillator 20MHz
I understand how to direct output to a particular pin and calculate the duty cycle. I just could not understand how to work out CYCLES for a particular frequency of the output pulse train against the frequency of the internal/external oscillator of a PIC.
Thanks for the help.