piclist 2003\02\12\190809a >
Thread: Non linear PWM of LEDs
face BY : Ned Konz email (remove spam text)

On Wednesday 12 February 2003 02:50 pm, you wrote:

> The program I posted was in Pascal and meant to run on a regular
> computer. It's only connection to MPASM is that its output is meant
> for MPASM as input.  I posted the source code to illustrate the
> algorithm, and didn't expect anyone to run it directly.  It's so
> simple that I figured if someone wanted it, they could re-code it
> in their favorite high level language.

And here's the same thing in Ruby (http://ruby-lang.org), a
cross-platform language that's great to use for this kind of thing:

max_in_k = 255
m_k = 1.022056
print(" retlw   0  ;  0\n")
ov = 1.0
(1 .. max_in_k).each do | iv |
 printf(" retlw %3d ;%3d\n", (ov+0.5).floor, iv)
 ov *= m_k

Ned Konz

http://www.piclist.com hint: The list server can filter out subtopics
(like ads or off topics) for you. See http://www.piclist.com/#topics
<200302121607.22847@ned.bike-nomad.com> 7bit

In reply to: <001801c2d2e9$3399de10$0300a8c0@main>
See also: www.piclist.com/techref/microchip/ios.htm?key=pwm
Reply You must be a member of the piclist mailing list (not only a www.piclist.com member) to post to the piclist. This form requires JavaScript and a browser/email client that can handle form mailto: posts.
Subject (change) Non linear PWM of LEDs

month overview.

new search...