CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to support@ccsinfo.com

Timer 0 and 1 queries

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
vsmguy



Joined: 13 Jan 2007
Posts: 91

View user's profile Send private message Visit poster's website

Timer 0 and 1 queries
PostPosted: Sun Jul 11, 2010 7:01 pm     Reply with quote

Reading 33023a.pdf set my ideas straight but now I have some questions:

1. Why would anyone want to enable T1SYNC?

An example scenario would be great

2. I am also intrigued by an old practice of "self-clocking" TMR0 by toggling T0SE to extract the timer0 prescaler value - but I do not get how toggling that bit increments the counter - any insights in this?
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Sun Jul 11, 2010 11:17 pm     Reply with quote

Quote:

Reading 33023a.pdf

That's the mid-range (16F) PIC Reference manual.
http://ww1.microchip.com/downloads/en/devicedoc/33023a.pdf
Quote:

1. Why would anyone want to enable T1SYNC?

It says right in there, in various places, why synchronous mode is required:
Quote:

14.3 Capture Mode

Note: Timer1 must be running in timer mode or synchronized counter
mode for the CCP module to use the capture feature. In asynchronous
counter mode, the capture operation may not work.

Quote:

14.4 Compare Mode

Note:
Timer1 must be running in Timer mode or Synchronized Counter mode if
the CCP module is using the compare feature. In Asynchronous Counter
mode, the compare operation may not work.

Quote:

12.8 Resetting Timer1 Using a CCP Trigger Output

Timer1 must be configured for either timer or synchronized counter
mode to take advantage of the special event trigger feature. If Timer1 is
running in asynchronous counter mode, this reset operation may not
work, and should not be used.

There might be other places where it says this.
vsmguy



Joined: 13 Jan 2007
Posts: 91

View user's profile Send private message Visit poster's website

Re: Timer 0 and 1 queries
PostPosted: Mon Jul 12, 2010 2:16 am     Reply with quote

vsmguy wrote:

2. I am also intrigued by an old practice of "self-clocking" TMR0 by toggling T0SE to extract the timer0 prescaler value - but I do not get how toggling that bit increments the counter - any insights in this?


1. How/why does toggling the T0SE increment the prescaler?

2. If the T0CKI pin gets physically damaged, will toggling the T0SE increment the prescaler anyways?
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Mon Jul 12, 2010 12:12 pm     Reply with quote

These questions should be asked on the Microchip forum.
vsmguy



Joined: 13 Jan 2007
Posts: 91

View user's profile Send private message Visit poster's website

PostPosted: Mon Jul 12, 2010 12:15 pm     Reply with quote

I thought so too - and I will - but I asked here (you) anyways as you tend to do a lot of hands on experiments!
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group