Searching \ for '[PIC]: Is is possible using TMR0?' 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/devices.htm?key=pic
Search entire site for: 'Is is possible using TMR0?'.

Exact match. Not showing close matches.
PICList Thread
'[PIC]: Is is possible using TMR0?'
2001\04\15@234401 by Jose S. Samonte Jr.

picon face
Is a 16-bit counter possible using TMR0? =)
Any tips?

Thank you so much.
Best regards.

____________________________________________________________________
Get free email and a permanent address at http://www.netaddress.com/?N=1

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


2001\04\16@070313 by mike

flavicon
face
On Sun, 15 Apr 2001 21:42:06 MDT, you wrote:

>Is a 16-bit counter possible using TMR0? =)
>Any tips?
Depends on what you mean by a 16 bit counter. You could just use the
prescaler, but this limits count resolution, as you can't read the
prescaler. On parts other than the 5x series, the other way is to generate an
interrupt on the TMR0 rollover and keep a high-byte in software. It is
also possible to use a hybrid of these methods (i.e prescaler +
software count), depending on applications requirements.
--
http://www.piclist.com hint: To leave the PICList
.....piclist-unsubscribe-requestKILLspamspam@spam@mitvma.mit.edu


2001\04\16@073011 by Jose S. Samonte Jr.

picon face
Hello sir Mike! =)
What I meant what that using the TMRO for longer delays, how do I do it?
Isn't it that the TMR0 can count up to a maximum of 255 only?
How could I make it count up to 65535?
Are there any example codes I could use as basis?

Thank you so much.
Kindest regards.
Have a nice day to all!



"Jose S. Samonte Jr." <dyoweespamKILLspamUSA.NET> wrote:
Is a 16-bit counter possible using TMR0? =)
Any tips?

Thank you so much.
Best regards.

____________________________________________________________________
Get free email and a permanent address at http://www.netaddress.com/?N=1

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



____________________________________________________________________
Get free email and a permanent address at http://www.netaddress.com/?N=1

--
http://www.piclist.com hint: To leave the PICList
EraseMEpiclist-unsubscribe-requestspam_OUTspamTakeThisOuTmitvma.mit.edu


2001\04\16@101309 by Dale Botkin

flavicon
face
You can set up TMR0 to interupt when it overflows (from 0xFF to 00).
Keep an 8-bit variable that you increment every time the interrupt occurs.
You can use TMR0 as the low-order 8 bits and the variable as the
high-order 8 bits.

Dale

On Mon, 16 Apr 2001, Jose S. Samonte Jr. wrote:

{Quote hidden}

---
The most exciting phrase to hear in science, the one that heralds new
discoveries, is not "Eureka!" (I found it!) but "That's funny ..."
               -- Isaac Asimov

--
http://www.piclist.com hint: To leave the PICList
RemoveMEpiclist-unsubscribe-requestTakeThisOuTspammitvma.mit.edu


2001\04\16@105121 by Jose S. Samonte Jr.

picon face
Got it! =)

Thank you so much!

Dale Botkin <spamBeGonedalespamBeGonespamBOTKIN.ORG> wrote:
You can set up TMR0 to interupt when it overflows (from 0xFF to 00).
Keep an 8-bit variable that you increment every time the interrupt occurs.
You can use TMR0 as the low-order 8 bits and the variable as the
high-order 8 bits.

Dale

On Mon, 16 Apr 2001, Jose S. Samonte Jr. wrote:

{Quote hidden}

---
The most exciting phrase to hear in science, the one that heralds new
discoveries, is not "Eureka!" (I found it!) but "That's funny ..."
               -- Isaac Asimov

--
http://www.piclist.com hint: To leave the PICList
EraseMEpiclist-unsubscribe-requestspammitvma.mit.edu



____________________________________________________________________
Get free email and a permanent address at http://www.netaddress.com/?N=1

--
http://www.piclist.com hint: To leave the PICList
RemoveMEpiclist-unsubscribe-requestEraseMEspamEraseMEmitvma.mit.edu


2001\04\16@142714 by mike

flavicon
face
On Mon, 16 Apr 2001 05:30:08 MDT, you wrote:

>Hello sir Mike! =)
>What I meant what that using the TMRO for longer delays, how do I do it?
>Isn't it that the TMR0 can count up to a maximum of 255 only?
>How could I make it count up to 65535?
>Are there any example codes I could use as basis?
Use the prescaler - look at the description of the OPTION register for
how to set this up. If you set the prescaler to 256, TMR0 will only
increment on every 256th clock (internal or external, as configured)

--
http://www.piclist.com hint: To leave the PICList
RemoveMEpiclist-unsubscribe-requestspam_OUTspamKILLspammitvma.mit.edu


2001\04\17@125122 by Michael Rigby-Jones

flavicon
face
You can expand this to as many bits as you want (within reason).  Also you
don't have to use interrupts.  As long as your main program loop runs faster
than TMR0 overflows, you can just poll the T0IF flag in you code.  If it is
set, then clear it and increment your 8 bit counter.

Regards

Mike

> {Original Message removed}

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