Ok I am really confused with PWMOUT.
I have an 18X setup and have an LED on output 3.
I have serial in working and it can chat to the computer fine via terminal. I want to be able to change the brightness of the LED via PWM.
So, I have:
serin 2, N4800, b10
That'll give me a value between 0-9 which I'll send.
I then have:
if b10="0" then backlightoff
which means if I send 0 it will go to a sub that sends pwmout 3,0,0 to turn it off.
I then need to know what to put next. What sums to turn 1-9 into the correct PWM values to get me something like 10-100%. It doesn't need to be exact, just about right.
So I want to know what sums I need to do to create the two values needed for the pwmout:
pwmout 3, ?, ?
Thanks,
computer
I have an 18X setup and have an LED on output 3.
I have serial in working and it can chat to the computer fine via terminal. I want to be able to change the brightness of the LED via PWM.
So, I have:
serin 2, N4800, b10
That'll give me a value between 0-9 which I'll send.
I then have:
if b10="0" then backlightoff
which means if I send 0 it will go to a sub that sends pwmout 3,0,0 to turn it off.
I then need to know what to put next. What sums to turn 1-9 into the correct PWM values to get me something like 10-100%. It doesn't need to be exact, just about right.
So I want to know what sums I need to do to create the two values needed for the pwmout:
pwmout 3, ?, ?
Thanks,
computer