Hi, I'm the proud new owner of four 08M's and a new breadboard thanks to what I've read here and on Stan's web site.
I'm trying to do something that I've been doing on my oopic-r for some time as a simple test of the pwmout.
I want to be able to ajust the brightness of the led I have on pin0. Is the pwmout ok to use on pin 0?
I can make the led flash in the usual manner but can't adjust the brightness up and down like I want.
Haven't put an led on pin2 to try it but thought I'd say hello first.
-----code follows------
'PWMOUT pin,period,duty cycles
pause 5000
high 0
pause 1000
low 0
top:
for b0 = 256 to 0 step -16
pwmout 0,b0,100 ' set pwm
' pwmout 0,100,b0 ' tried this too
pause 250
next b0
I'm trying to do something that I've been doing on my oopic-r for some time as a simple test of the pwmout.
I want to be able to ajust the brightness of the led I have on pin0. Is the pwmout ok to use on pin 0?
I can make the led flash in the usual manner but can't adjust the brightness up and down like I want.
Haven't put an led on pin2 to try it but thought I'd say hello first.
-----code follows------
'PWMOUT pin,period,duty cycles
pause 5000
high 0
pause 1000
low 0
top:
for b0 = 256 to 0 step -16
pwmout 0,b0,100 ' set pwm
' pwmout 0,100,b0 ' tried this too
pause 250
next b0