Hi Gang,
I have a little project that I'm fooling around with.
I need to create a 99,000.0 hour hourmeter using six, 7 seg led displays. It needs to retain the counted time in eeprom when the power is off to restart from where it stopped.
My thoughts are to use the 60hz from the mains, drop it and put it into the base of a transistor and pull high an i/p pin 60 times a second. I can then count that and when I get a total of 21600 counts, I can increment a counter by 1 and display it on the 7 seg's. (21600 = 60hz x 60 sec x 6min = 1/10th hour)
Heres how I think it should flow....
Power up
read eeprom
if eeprom = 0 set display to 0
if eeprom any other value, start display at that value
Start counter
when counter = 21600 increment display by 1
write display to eeprom.
I'll be using a 16f88, multiplexing the segments and using just the 1 i/p to measure the pulses.
Problem is, pulsein measures the pulsewidth and count measures a number of counts in a specified time, ie 1 second. I need to continually measure the pulses coming in and send an advance when we reach 21600 pulses. So how do I do that??
Bookmarks