Thanks for the input. However using this command B_Fadein_Time reaches the 255 max in around 90 seconds
I tried 1000 as the multiplier, but the timing is still out as it uses just the integer and not the full decimal value you get in the calculations. What I'm after is the ability to set the max value for the brightness (B_max - B_min) and then use this value (between 0 and 255) to work out the pulse duration so that it goes from 0 to B_Max in the difference between the two times. On paper it's a simple calculation, but getting it to work in PBP without any floating point maths is becoming the stumbling block. My code also used a 1307 RTC, so using the pause statement in DT's Multi SPWM routine might effect the time being displayed on the LCD -
Bookmarks