Hello David. I think can help you in some thing. The best way to do a long timer is really using INT of TMR0. Place the prescaler 1/256 . I used a 4 mhz clock. Enable INT of TMR0, then use some Regs. to get the time. See the codes that you get an time aprox. 2:00hs. For 24hs it places more some other Regs. ;Make a macro t_2hs: macro movlw d'15 ' movwf cont_1sec ;Its will give aprox 1sec movlw D'60 ' movwf cont_1min ;its will give aprox 1min. movlw d'180 ' ;thats is the min. here is 180min. = 2hs movwf cont_h_min endm org 0x004 btfss INTCON,T0IF ;Int tmr0 ok retfie bcf INTCON,T0IF ;clr the flag ;Here it begins the time of approximately 2:00hs decfsz cont_1sec,1 retfie movlw d'15 ' movwf cont_1sec ;carry the values of 1sec again decfsz cont_1min,1 retfie movlw d'60 ' ;carry the values of 1min again movwf cont_1min movlw d'15 ' movwf cont_1sec decfsz cont_h_min,1 ;Dec.the min. retfie ; here, do what you want Excuse my English and I do not the C codes. Regards Lu’s F. -----Mensagem Original----- De: David Williams Para: Enviada em: Segunda-feira, 4 de Outubro de 1999 15:45 Assunto: 24 hour timer > Hello, > > 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). Anyway, anyone have any ideas how to set up > a 24 hour count? C code is preferred. > > Thanks, > Dave