Ha! You see? It has spurred another thought: By dividing the elapsed time since midnight by 85 (seconds) it is possible to use each bit as a flag - with limited resolution, but... well, perhaps adequate.
Ha! You see? It has spurred another thought: By dividing the elapsed time since midnight by 85 (seconds) it is possible to use each bit as a flag - with limited resolution, but... well, perhaps adequate.
User inputs time in hours and minutes, so second precision is not required, minute-level precision will be enough.
Hi,
I'll admit, I don't really get that or exactly what you're doing but I thought the issue was lack of variable space.... If you're going to use flags to keep track of what's what then you might as well use those flag bits as part of the "time variable" to increase its resolution.Differentiation between 11:14 and 14:11 will be quite easy, because when time from RTC reaches that time, a variable is toggled, which can be later used to determine exactly what time should be read now.
Anyway, if the resolution can be reduced then of course you can fit in any number of bits, just a matter of how much you need to reduce the resolution.
/Henrik.
I'm doing a light controller timer. It has 16 channels, user can set up individual channel ON and OFF times, by inputting time in hours and minutes.
@AmoqueThere are 24 hours in a day and 4 bits will only "do" 0-15.Nor do I full understand why 6 minute samples are needed? There are 12 five minute segments in an hour; if it possible to represent the 12 hour positions in 4 bits, why can not the 12 five minute positions be represented similarly (in four bits)?
George
I have to ask, Why are the byte constraints so important? Why not words? Are you that straped for eeprom space?
Dave Purola,
N8NTA
EN82fn
Bookmarks