Have a look at Darrels' MIBAM code;
http://www.picbasic.co.uk/forum/showthread.php?t=10564
This will give you a very smooth fade in/out effect, and it's easy to use.
Have a look at Darrels' MIBAM code;
http://www.picbasic.co.uk/forum/showthread.php?t=10564
This will give you a very smooth fade in/out effect, and it's easy to use.
Guys, thanks for the replies - I now have my 16F887 pwm ramping an led just the way I want it !!
A follow-up question...
Keeping in mind this is for an aquarium, I would like to be able to have the pwm start at a specific time every morning and turn off at a specific time at night (probably with a ramp-down, prior to shutdown). The timer on/off times will be coded in the program (and not require external input).
I have read close on 20 different timer-related threads and I'm struggling to see how you can have a timer running concurrently with the pwm code.
Any help, much appreciated.
Bookmarks