piclist 2001\01\03\134141a >
Thread: Timer 0
www.piclist.com/techref/microchip/time.htm?key=time
picon face BY : Drew Vassallo email (remove spam text)



>>How about
>>
>>Comm_Bit_Loop:
>>         btfsc   TMR0,7             ;Check for timer hitting zero
>>         goto    Comm_Bit_Loop           ;If not, then keep looping
>>         bsf     TMR0,7

I guess I don't understand this, since even if you clear the TMR0 register
before entering this loop, it will show "zero overflow" according to the bit
7 test when TMR0 gets to 128, not 256.  I NEVER use bit 7 for a 'pass zero'
test unless you're using decf or otherwise subtracting a value less than
128.

>I guess that works, but it's not really what I had in mind.

I don't see how it could work.

>Is it true that the int flag is set, even when not enabled?
>Figure 6-1 and 6-6 show no dependencies between the timer register and the
>T0IF bit.

I've used the T0IF bit to detect TMR0 overflow without enabling the
interrupt and it works fine.  Yes, the datasheet is correct in stating that
the flag bit is set regardless of the mask.

Are you using the watch window to monitor the INTCON register for the T0IF
bit?  If so, what does it do when TMR0 overflows?  Note that it doesn't get
RESET  - you have to clear the flag bit in software after it's set by TMR0
overflow.

--Andrew
_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com

--
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



seeking: ubicom lib io video
<F15ve5IY73Hnw2HbXOS0000b783@hotmail.com>

See also: www.piclist.com/techref/microchip/time.htm?key=time
Reply You must be a member of the piclist mailing list (not only a www.piclist.com member) to post to the piclist. This form requires JavaScript and a browser/email client that can handle form mailto: posts.
Subject (change) Timer 0

month overview.

new search...