PIC 16F877A interanl clock and external clock

Status
Not open for further replies.

ariesme

Newbie level 2
Joined
May 17, 2011
Messages
2
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,291
i m learning tImer 0 for interrupt of 16F877A...
i see the equation for calculate the period...
for internal clock Fosc=4Mhz, period=(256-TMR0)X4ToscXprescaler...
but if i put my hardware crystal is20MHz, then this 20MHz is my internal clock or external clock???
so, my interrupt equation should use 4MHz or 20MHz as calculate??
i feel confuse with it...:???:
pls giving advance...
 

That's timer 0 internal clock, and its frequency is a fourth part of the Crystal frequency (in your case: 20MHz / 4 = 5MHz)
Timer 0 external clock must be connected to T0CKI pin, and the Timer setup registers should be properly configured to run from this clock.
 
Regnum, thx for ur reply...i get it..^^
 

Status
Not open for further replies.

Similar threads

Cookies are required to use this site. You must accept them to continue using the site. Learn more…