Hi, I have two question with the use of the PWM....
The first one is, If I use PWM of 10 bit, because I do not have 1023, instead of 255?
Hi, I have a question with the use of the PWM
Moderator: Benj
- Francisco Cabrera
- Posts: 47
- Joined: Sat Mar 19, 2016 4:56 pm
- Location: Canary Island
- Has thanked: 23 times
- Been thanked: 7 times
- Contact:
- Francisco Cabrera
- Posts: 47
- Joined: Sat Mar 19, 2016 4:56 pm
- Location: Canary Island
- Has thanked: 23 times
- Been thanked: 7 times
- Contact:
Re: Hi, I have a question with the use of the PWM
And the second question is,Since it is possible to choose for example a frequency of 10khz? .......regards
- Attachments
-
- PWM2.jpg (188.08 KiB) Viewed 3015 times
- LeighM
- Matrix Staff
- Posts: 2178
- Joined: Tue Jan 17, 2012 10:07 am
- Has thanked: 481 times
- Been thanked: 699 times
- Contact:
Re: Hi, I have a question with the use of the PWM
Hi,
1) You need to set the PWM property "Period Overflow" value to 1023 (this is only possible on target processors that support it)
2) The frequency will be calculated from the "Period Overflow" and the "Prescaler" values, and displayed. But you cannot set the frequency directly.
Hope that helps
Leigh
1) You need to set the PWM property "Period Overflow" value to 1023 (this is only possible on target processors that support it)
2) The frequency will be calculated from the "Period Overflow" and the "Prescaler" values, and displayed. But you cannot set the frequency directly.
Hope that helps
Leigh
- Francisco Cabrera
- Posts: 47
- Joined: Sat Mar 19, 2016 4:56 pm
- Location: Canary Island
- Has thanked: 23 times
- Been thanked: 7 times
- Contact:
Re: Hi, I have a question with the use of the PWM
Thank you very much for answering, Already I could have fitted the frequency to 10khz, But the rollover lowers 120,
the problem is for microprocessor of 8 bits...18f4620 I was thinking that on having chosen the pwm setdutyCycle10bits, Already it would work to 10 bits
PD: Again thank you very much for the help
the problem is for microprocessor of 8 bits...18f4620 I was thinking that on having chosen the pwm setdutyCycle10bits, Already it would work to 10 bits
PD: Again thank you very much for the help
- Attachments
-
- pwm.1.jpg (161.75 KiB) Viewed 3004 times