So the frequency is a dword counted in hertz? Meaning if we need 29KHz we do pwm_set_frequency (29_000) ? It doesn't work for me even with prescaler 1 at 40Mhz and PR2 register =0xFF it should work up to 39KHz
The second problem (and is quite a problem) is the length of a small code: pwm_max_resolution(1) pwm_set_frequency(29000) pwm1_set_dutycycle_highres(512) pwm1_on() is eating around 800 bytes... Vasile On Mon, Aug 23, 2010 at 1:02 PM, Sebastien Lelong < [email protected]> wrote: > Hi Vasile, > > Maybe "pwm_set_frequency(dword in freq)", in pwm_common.jal ? > See: http://justanotherlanguage.org/content/jallib/tutorials/tutorial_pwm2 > > Cheers, > Seb > > 2010/8/23 vasile surducan <[email protected]> > >> Hi all, >> >> In the current pwm library (pwm_common.jal, pwm_hardware.jal, >> pwm_ccpx.jal) the pwm frequency can be set exactly (in terms of KHz) ? >> >> thx, >> Vasile >> >> -- >> You received this message because you are subscribed to the Google Groups >> "jallib" group. >> To post to this group, send email to [email protected]. >> To unsubscribe from this group, send email to >> [email protected]<jallib%[email protected]> >> . >> For more options, visit this group at >> http://groups.google.com/group/jallib?hl=en. >> > > > > -- > Sébastien Lelong > http://www.sirloon.net > http://sirbot.org > > -- > You received this message because you are subscribed to the Google Groups > "jallib" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]<jallib%[email protected]> > . > For more options, visit this group at > http://groups.google.com/group/jallib?hl=en. > -- You received this message because you are subscribed to the Google Groups "jallib" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/jallib?hl=en.
