For testing I've included the constant directly  in the body of the
pwm_set_frequency as const word freq = 29000,

this is discharging around 340 bytes, but dword variable can be used in
jalv2 at this moment only as a good joke...

I can't reproduce the initial problem, but is a problem of procedures
calling order, I'll take a look later.

However pwm1_set_percent_dutycycle is not accurate at all, is useless.

thx,
Vasile

On Tue, Aug 24, 2010 at 11:42 AM, Sebastien Lelong <
[email protected]> wrote:

>
>
>
> I guess dword is killing some bytes while computing frequency parameters
> (have you tried to dig this in order to know where bytes are eaten ?). I
> guess another procedure where frequency is a constant (assuming you don't
> need variable frequency) could be added:
>
>     const dword PWM_FREQUENCY = 29_000
>
    include pwm_hardware
>     ...
>     pwm_max_resolution(1)
>     -- pwm_set_frequency(29000) ; not needed anymore
>     pwm1_set_dutycycle_highres(512)
>     pwm1_on()
>
>
> Somewhere in pwm libs:
>
> if defined(PWM_FREQUENCY) then
>    -- user (probably Vasile) needs a constant frequency)
>    -- => setup freq params as in pwm_set_frequency but this time using
>    -- a constant.
> end if
>
>
> Cheers,
> Seb
>
>
>
>>
>> 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]<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.

Reply via email to