please advice if I am setting Timer0 as counter

Thread Starter

micropad

Joined Dec 24, 2011
106
Dear All,
please advice if I am setting Timer0 as counter mode of PIC 16f877a MCU

Let's think if we insert T0CKI pin 10Hz pulse, then I need to know the TMR0 register increase at 10HZ or less than 10HZ due to requirements with internal clocks sampling sync (Q2-Q4) let's assume prescaler set as 1:1
please advice
 

Thread Starter

micropad

Joined Dec 24, 2011
106
It will increase at 10Hz. To get 1:1 prescaler you have to assign it to the WDT, following the sequence in the datasheet.
Thanks Markd for your reply
As per datasheet every external clock sample at Q2 to Q4 of internal clock
and RC delay 20ns. can you kindly explain, how this delay does not effect to increment TMR0 register
Your reply is highly appreciated
 

Markd77

Joined Sep 7, 2009
2,806
It means that it won't have a problem sampling anything significantly slower than the instruction frequency (assuming the width of the pulse and gap meet the timing requirement). 10Hz is 100000 times slower than a PIC running at 4MHz, so unless your pulses are very short (and it's pretty hard to make a pulse that short) there will be no problems.
 
Top