piclist 2001\10\18\062552a >
Thread: Extending TMR2
face BY : Mike Blakey email (remove spam text)

Thanks for the reply, This is exactly what I was looking for, the only problem I
have is that during the pulse period the PIC is 'busy' doing some other stuff!  I
think I'm going to have to do as you have suggested, even counting several
interrupts will give higher resolution, but may cause me stack problems, which is
what I am trying to avoid.

Thanks for the help.

snurpleKILLspamspamRemoveMEHOTMAIL.COM on 17/10/2001 15:10:56
Please respond to TakeThisOuTPICLISTspamspam_OUTMITVMA.MIT.EDUspamspam_OUTINTERNETspamspam_OUTwtgw

To:     .....PICLISTTakeThisOuTspamspam_OUTMITVMA.MIT.EDUTakeThisOuTspamspam_OUTINTERNETTakeThisOuTspamspam_OUTwtgw
Paper Mail:
Subject:        Re: [PIC]: Extending TMR2

                  *** WARNING ***

This mail has originated outside your organization,
either from an external partner or the Global Internet.
    Keep this in mind if you answer this message.

>I'm currently using a 16f876 20Mhz. in an application.  I need to delay an
>between 0.06s and 0.003s.
>I have pre and post scaled to 16 on TMR2 but can only get a max. delay of
>0.029s  I
>can not afford the overhead of waiting and counting interrupts. does anyone
>any *smart* ideas to extend the time period?

Maybe this isn't what you're looking for, since you haven't included any
details about the function of your program, but, how about this:

1) Clear a flag bit when you set your output low (for example)
2) When you get your .029s interrupt, check the flag bit.  If clear, set it.
 If set, then change your output high (2*.029s ~ .06s).

Of course, you'd have to set your delay for 1/2 of what you need, then use
the flag to double it.

I'm not sure if you need better precision, but since you mentioned a range
of .003s and .06s, this might be good enough.  And you'd only have a .002s
max error (assuming your max. delay possible is REALLY .0290 seconds) with
the flag's doubling effect.


Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp

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

This email and any attachments are confidential to the intended
recipient and may also be privileged. If you are not the intended
recipient please delete it from your system and notify the sender.
You should not copy it or use it for any purpose nor disclose or
distribute its contents to any other person.

http://www.piclist.com hint: To leave the PICList

<"011018095432Z.WT13888. 23*/PN=Mike.Blakey/OU=Technical/OU=NOTES/O=BAe MAA/PRMD=BAE/ADMD=GOLD 400/C=GB/"@MHS>

See also: www.piclist.com/techref/microchip/devices.htm?key=pic
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) Extending TMR2

month overview.

new search...