Sync with Internal clocks

Thread Starter

micropad

Joined Dec 24, 2011
55
Dear All
please advice what is the meaning of Timer0 "Sync with Internal clocks" of pic 16f877a MCU
what is the in phase of internal clock and external clocks
 

thatoneguy

Joined Feb 19, 2009
6,359
The timers increment at the same speed the CPU runs. Typically, Fosc/4, so if you have a 20Mhz crystal, the cpu executes 4 millioni instructions per second, and timer0 with no pre-scaler increments at 4Mhz.
 

Thread Starter

micropad

Joined Dec 24, 2011
55
The timers increment at the same speed the CPU runs. Typically, Fosc/4, so if you have a 20Mhz crystal, the cpu executes 4 millioni instructions per second, and timer0 with no pre-scaler increments at 4Mhz.
Thanks For reply

Please advice how Timer0 increment at 4MHz if you have 20MHz crystal.
I think it should be 5MHz (Fosc/4 = 5MHz) am I correct.
 

Thread Starter

micropad

Joined Dec 24, 2011
55
Uwe the capture part of the CCP module, See the datasheet, timer0 and runs in the background while other code is running.
Thanks for reply
yes correct Timers running while other codes running
so where I stuck is, why the external clock sync with internal clock and what is sync. I think internal clock and external clock should comes on in phase that is called sync

please advice
 

thatoneguy

Joined Feb 19, 2009
6,359
External clock, such as CLKOUT sync is to keep outside logic moving at the same speed as the CPU, or the fastest rate the CPU's pins could change state.
 
Top