Task is to flash light at different rates, based on the setting. Value will be entered with switches.
The range for flash setting is a long one: around 100 to 10000 flashes per minutes.
The time calculation then becomes (60/flash setting)*10^6 for time in us.The timer can be set to exactly this value, or there can be a counter for each setting.Which leads to more calculations.
The flash resolution I need is upto 1 flash/setting. I need accuracy in the calculations. This kind of division will be difficult to do in 16F.
Another option would be to use look up tables. But again, my range is quite large, so cant have that option either.
I have a feeling, I am missing a point somewhere and there would be a simpler way to accomplish it. Any ideas ?
Thanks in advance.
The range for flash setting is a long one: around 100 to 10000 flashes per minutes.
The time calculation then becomes (60/flash setting)*10^6 for time in us.The timer can be set to exactly this value, or there can be a counter for each setting.Which leads to more calculations.
The flash resolution I need is upto 1 flash/setting. I need accuracy in the calculations. This kind of division will be difficult to do in 16F.
Another option would be to use look up tables. But again, my range is quite large, so cant have that option either.
I have a feeling, I am missing a point somewhere and there would be a simpler way to accomplish it. Any ideas ?
Thanks in advance.