Hi, I have a question with the use of the PWM

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 6.

Moderator: Benj

Post Reply
User avatar
Francisco Cabrera
Posts: 47
Joined: Sat Mar 19, 2016 4:56 pm
Location: Canary Island
Has thanked: 23 times
Been thanked: 7 times
Contact:

Hi, I have a question with the use of the PWM

Post by Francisco Cabrera »

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?
Attachments
PWM 1.jpg
PWM 1.jpg (184.91 KiB) Viewed 3015 times

User avatar
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

Post by Francisco Cabrera »

And the second question is,Since it is possible to choose for example a frequency of 10khz? :? :?:.......regards
Attachments
PWM2.jpg
PWM2.jpg (188.08 KiB) Viewed 3014 times

User avatar
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

Post by LeighM »

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

User avatar
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

Post by Francisco Cabrera »

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
Attachments
pwm.1.jpg
pwm.1.jpg (161.75 KiB) Viewed 3003 times

Post Reply