Linearizing an LED for 800 pwm steps'?


Results 1 to 37 of 37

Threaded View

  1. #9
    Join Date
    Apr 2007
    Location
    Pennsylvania, USA
    Posts
    158


    Did you find this post helpful? Yes | No

    Default Re: Linearizing an LED for 800 pwm steps'?

    What if you keep all the values below 256 and do multiple lookup tables with some simple maths.

    ex.

    if X<256 then lookup X, [0,...255],duty
    if X>255 and X<512 then lookup X-256, [0,...255],duty
    if X>511 and X<768 then lookup X-512, [0,...255],duty
    if X>767 then lookup X-768, [0,...255],duty

    You will loose some resolution in the upper bits, but that is where it doesn't matter for this application.
    Last edited by spcw1234; - 27th February 2012 at 12:22.
    Shawn

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