> I've got to set a pin every 24 hours plus or minus 10 minutes. I need the > timer to work while I'm doing a bunch of other things (I guess this means > I've got to use interrupts). Or you have to have a main loop that always takes the same amount of time, that is, the same amount of instructions, no matter what "else" it is doing. Sometimes that's practical, usually not. > Anyway, anyone have any ideas how to set up > a 24 hour count? C code is preferred. That depends on which part you are targeting, and which timer hardware you have available. Certainly you cannot set up the hardware to interrupt you only every 24 hours (except with ridiculously low clock rates). So you are going to have to set up an interrupt to occur every so often (Say every second or so). Your ISR usually just counts, (with a counter of more than one byte), and returns. When the magic number of interrupts has occured, the ISR sets a flag to tell you its time to do the "daily" thing. That's the general idea. If you need more specific help, tell us what the hardware config. is, and which timers you can spare. ------------ Barry King, KA1NLH Engineering Manager NRG Systems "Measuring the Wind's Energy" Hinesburg, Vermont, USA www.nrgsystems.com