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

Help About T1_CLK_OUT

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



Joined: 06 Mar 2007
Posts: 92
Location: Pune,India

View user's profile Send private message AIM Address Yahoo Messenger

Help About T1_CLK_OUT
PostPosted: Thu Jan 03, 2008 12:16 am     Reply with quote

Dear Sir,
here i am using 16f913, MPLAB 7.5 Ver. & CCS PCM C Compiler, Version 3.249, 34534.
In my application i defined timer1 as,
Code:
setup_timer_1(T1_EXTERNAL | T1_DIV_BY_1 | T1_CLK_OUT);

with this i am not getting correct time if my i/p frequency< 295 Hz.
but i defined like this
Code:
setup_timer_1(T1_EXTERNAL | T1_DIV_BY_1);

I am getting correct time.
Here i am connected external crystal (32.768 kHz) to pin no 9.
can anybody know about T1_CLK_OUT ?
_________________
Thank You,
With Best Regards,
Deepak.
Humberto



Joined: 08 Sep 2003
Posts: 1215
Location: Buenos Aires, La Reina del Plata

View user's profile Send private message

PostPosted: Thu Jan 03, 2008 8:41 am     Reply with quote

Quote:

Here i am connected external crystal (32.768 kHz) to pin no 9.
can anybody know about T1_CLK_OUT ?


1) This device already has a built in 32.768 kHz crystal oscillator in the Timer1 module,
you only need to enable it. Set the control bit (3) T1OSCEN of the T1CON register (0x10).

2) If an external clock source is selected, you should use the T1CK1 input clock RC5

3) It is not a good practice to refer any I/O with its pin number because this is package
dependant. Instead you could use the pin name (RA6, RB5, RC7, etc) which are
device dependants.


Humberto
deepakomanna



Joined: 06 Mar 2007
Posts: 92
Location: Pune,India

View user's profile Send private message AIM Address Yahoo Messenger

Help About T1_CLK_OUT
PostPosted: Thu Jan 03, 2008 11:16 pm     Reply with quote

to the RC5 i have connected frequency i/p and calculating frequency by using CCP1 interrupt.So if the frequency is < 297 Hz i have to increment number every 1 sec.i.e.it should work as RTC & above >=297 it is frequency dependent.i.e. if freq. rises the time for 1 sec counter rise & if freq is 594 Hz number should increment every 0.5 sec.
But i am not getting correct time.
_________________
Thank You,
With Best Regards,
Deepak.
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