Decimal PWM Cycle values?


Closed Thread
Results 1 to 3 of 3

Hybrid View

  1. #1
    Join Date
    Oct 2005
    Location
    Sweden
    Posts
    3,624


    Did you find this post helpful? Yes | No

    Default Re: Decimal PWM Cycle values?

    Hi,
    No, you can not produce a PWM signal with a LESS than one cycle - and that's not a PBP limitation. What you can do to make it fade up/down faster is to decrease the number of discrete dutycycles that it "passes thru" by using the STEP directive in the FOR-NEXT loop, like you do when fading down
    Code:
    For Duty = 0 to 255 STEP 5
       PWM LED_0, Duty, Clycle
    NEXT
    Or you could increase the oscillator frequency which in turn will increase the frequency generated by the PWM command.

    /Henrik.

  2. #2


    Did you find this post helpful? Yes | No

    Default Re: Decimal PWM Cycle values?

    Thanks Henrik, I'll give your suggestion a try. My only concern is that I don't want flickering.

    BTW, I'm already using a 20Mhz crystal.

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts