Quote Originally Posted by glkosec View Post
The problem that i am having is that i need it to work so that if i make my ON time larger it makes the OFF time smaller while keeping the CYCLE time the same.
8 bit ADC has 265 steps. Subtract the ON reading from 256, if the ON is reading 64 then OFF will be 192. ON is 192 then OFF will be 64...
I cant figure out how to basically do two things at once.
Not going to happen with software routines.
The final problem is that i need the ON time and the CYCLE time to be adjustable is specific time ranges.
Maybe if
POT_TIME is > 0 and < 50 then T1
POT_TIME is >50 and < 100 then T2