I used it once for logging and removed it. I did compensate for the write period. I actually slowed it down a lot so I could see what was happening at individual increments.
I tried i = fb and incrementing the i byte and not the fb byte and it works. I get a smooth up and down output now. It will current limit at each brightness setting.
So, there is the last problem to resolve:
When ramping up I am using duty cycle to increase brightness from zero to full on regardless of where the current limit is set at. The problems are that when I save the new current limit during the main loop, I get flashing as the output goes off during the write command and the pause 10 after the write command. Therefore, I can either write to EEPROM and ramp up to the newly set current limit, or have no flashing and ramp up to full output, go to the main loop and drop straight back to the new current limit. Both options dont look very good.
I am not sure how to write to EEPROM and stop it from flashing.




Bookmarks