At 01:05 PM 1/3/01 -0500, David VanHorn wrote: >I'm confused. > >I've set timer0 to run, and I'm polling as follows for the T0IF bit. > >Comm_Bit_Loop: > btfss INTCON,T0IF ;Check for timer hitting zero > goto Comm_Bit_Loop ;If not, then keep looping > >It appears that the int flag is never set. >Ints are disabled, but I thought I read that the int flag would still be >set on rollover. I *know* for a fact that T0IF is set upon timer 0 rollover regardless of the state of T0IE. In fact, I have several dozen projects using that very technique. It lets me make my background task a polled routine and thus reserve the ISR for time critical routines. I would check the option register bit 5 (T0CS) - TMR0 can be configured for external clock input. It sure sounds like TMR0 isn't clocking. I also do a lot of work with 12 bit core parts - no T0IF. But its not much of a problem - I make my "flag test" routine look for TMR0 bit 7 to go low, then look for it to go high. i.e. . ... WaitBGflagLO btfss TMR0,7 goto WaitBGflagLO WaitBGflagHI btfsc TMR0,7 goto WaitBGflagHI ;BG task starts here You have to do both tests (bit 7 lo, then high) to avoid having to reset TMR0. dwayne Dwayne Reid Trinity Electronics Systems Ltd Edmonton, AB, CANADA (780) 489-3199 voice (780) 487-6397 fax Celebrating 16 years of Engineering Innovation (1984 - 2000) * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Do NOT send unsolicited commercial email to this email address. This message neither grants consent to receive unsolicited commercial email nor is intended to solicit commercial email. -- http://www.piclist.com hint: The list server can filter out subtopics (like ads or off topics) for you. See http://www.piclist.com/#topics