Searching \ for '[pic]: 16F84 timer behaviour' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: www.piclist.com/techref/microchip/time.htm?key=time
Search entire site for: '16F84 timer behaviour'.

Exact match. Not showing close matches.
PICList Thread
'[pic]: 16F84 timer behaviour'
2001\07\19@014612 by Simon-Thijs=20de=20Feber?=

flavicon
face
Hello all,

I was wondering what the exact behaviour of the timer
is.

Firts I set the timer interrupt and pre-scalers.
When i need the timer I write 0x00 to it and it starts
to run. Gives an interrupt on 0xFF->0x00. I handle the
interrupt.

But what then ????????

I noticed that i have to write 0x00 to it again to
start it !

Is this correct ???


grtz,


Simon



____________________________________________________________
Do You Yahoo!?
Get your free @yahoo.co.uk address at http://mail.yahoo.co.uk
or your free @yahoo.ie address at http://mail.yahoo.ie

--
http://www.piclist.com#nomail Going offline? Don't AutoReply us!
email spam_OUTlistservTakeThisOuTspammitvma.mit.edu with SET PICList DIGEST in the body


2001\07\19@070653 by Byron A Jeff

face picon face
On Thu, Jul 19, 2001 at 06:44:57AM +0100, Simon-Thijs de Feber wrote:
> Hello all,
>
> I was wondering what the exact behaviour of the timer
> is.
>
> Firts I set the timer interrupt and pre-scalers.
> When i need the timer I write 0x00 to it and it starts
> to run.

This isn't correct. The writing of the 0 doesn't start the timer. The timer
enable bit is in a control register. Since I use 16F87X parts now, I can't
tell you exactly where that register is located. But once enabled the timer
will run on its own.

> Gives an interrupt on 0xFF->0x00. I handle the
> interrupt.

Right.

>
> But what then ????????
>
> I noticed that i have to write 0x00 to it again to
> start it !
>
> Is this correct ???

Nope. The timer should continue running. In fact to maintain accurate time
it's best to leave it free running. If you write to the timer it loses some
of its resolution in the write delay.

In my last project, I use two of the three timers in the 16F877. Both are
free running. Once they are initialized, there are no other writes to the
timer registers.

BAJ

--
http://www.piclist.com#nomail Going offline? Don't AutoReply us!
email .....listservKILLspamspam@spam@mitvma.mit.edu with SET PICList DIGEST in the body


2001\07\19@073540 by Simon-Thijs=20de=20Feber?=

flavicon
face
Thanks,

I do not use it for time keeping.
It is meant as delayed take over from one state to the
other.

I set the timer and wait for it to come by 5 times and
then change the output (if there was a change at all).

> Nope. The timer should continue running. In fact to
> maintain accurate time
> it's best to leave it free running. If you write to
> the timer it loses some
> of its resolution in the write delay.
>

grtz,

Simon


____________________________________________________________
Do You Yahoo!?
Get your free @yahoo.co.uk address at http://mail.yahoo.co.uk
or your free @yahoo.ie address at http://mail.yahoo.ie

--
http://www.piclist.com#nomail Going offline? Don't AutoReply us!
email listservspamKILLspammitvma.mit.edu with SET PICList DIGEST in the body


2001\07\19@090731 by Olin Lathrop

face picon face
> Firts I set the timer interrupt and pre-scalers.
> When i need the timer I write 0x00 to it and it starts
> to run. Gives an interrupt on 0xFF->0x00. I handle the
> interrupt.
>
> But what then ????????
>
> I noticed that i have to write 0x00 to it again to
> start it !
>
> Is this correct ???

No.  It keeps going unless you deliberately stop it.  You do have to clear
the interrupt condition to be able to take another timer interrupt.


********************************************************************
Olin Lathrop, embedded systems consultant in Littleton Massachusetts
(978) 742-9014, .....olinKILLspamspam.....embedinc.com, http://www.embedinc.com

--
http://www.piclist.com#nomail Going offline? Don't AutoReply us!
email EraseMElistservspam_OUTspamTakeThisOuTmitvma.mit.edu with SET PICList DIGEST in the body


More... (looser matching)
- Last day of these posts
- In 2001 , 2002 only
- Today
- New search...