Hi Dave Basically speaking, I think you could try the following: If your PSU is not exactly 5v output, use a circuit such as an opto isolator to convert your DC output to a 5v logic level, then feed this to a digital input pin on the PIC. Otherwise you could connect the PSU output directly to the pin. When your PSU is on, the PIC pin would go high. Your software could poll this pin, enabling the timer when the pin reads high, or looping (waiting) endlessly while it's low. You could set your timer to count in seconds, tenths, hundredths or whatever, and each time the timer rolls over (which produces an interrupt) you could use that event to increment a byte or array of bytes. What number of time slices do you want to count up to? What you do with your count is then up to you. Hope this begins to help Regards Matt Dave Roseman wrote: > Hi, > > I am using a PIC16F690 to monitor how long a power supply is active for, but > I have no idea how to use the timer in the micro to monitor this signal. It > does go high when the power is on, but how to get this info to the micro, I > don't know. > > Also, this reading is required to be cumulative, so has to remember the > previous on time and append to it. > > I'm just starting PIC programming, so please forgive me if this is too > simple or obvious a question. > > > > Regards > > Dave Roseman > -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist