Michael 2727
Senior Member
Just a thought at the moment -
<code><pre><font size=2 face='Courier'>Main:
' debug
readadc10 1, w0
readadc10 4, w1
inc w3
if w3 = 1000 then Ramp
pwmout 2, 249, w3
goto Main:
Ramp:
' debug
readadc10 1, w0
readadc10 4, w1
dec w3
pwmout 2, 249, w3
if w3 = 0 then Main
goto Ramp </font></pre></code>
You will need an RC network to smooth out
the voltage.
All it needs now is for some clever person
to work out how to export the w1,w2 and w3
points to Excel etc.
Or just remove the READADC10s and watch the
LED fade up and down ~ ;o)
<code><pre><font size=2 face='Courier'>Main:
' debug
readadc10 1, w0
readadc10 4, w1
inc w3
if w3 = 1000 then Ramp
pwmout 2, 249, w3
goto Main:
Ramp:
' debug
readadc10 1, w0
readadc10 4, w1
dec w3
pwmout 2, 249, w3
if w3 = 0 then Main
goto Ramp </font></pre></code>
You will need an RC network to smooth out
the voltage.
All it needs now is for some clever person
to work out how to export the w1,w2 and w3
points to Excel etc.
Or just remove the READADC10s and watch the
LED fade up and down ~ ;o)