Do you see where it states TMR0 = 0 ' clear TMR0 count
This clears the timer0 count. If you need to write the timer0 count value to EEPROM first,
then simply move the TMR0 = 0 below where you have WRITE 7, TMR0. Then you will clear
the TMR0 count after you write it to EEPROM.
It's not rocket science...;o}
A TTL input requires 2V to VDD. As long as power is 4.5V ≤ VDD ≤ 5.5V, which just means
VDD is greater than or equal to 4.5V and less than or equal to 5.5V. Then it meets the Vih
logic 1 threshold.
A Schmitt Trigger tytpe input requires 0.8V * VDD to VDD.
If you were operating from a 5V supply, then 0.8 * 5V = 4V, which is what you'll need to
apply as a minimum to the input for it to recognize a logic 1.
Ground is ground. Your switch is for sure taking the input to ground.
With 4.5V ≤ VDD ≤ 5.5V, Vil is met when the input is at Vss, up to 0.8V. But check the
column under Conditions to be sure. It varies a bit with different VDD levels.
Look at PINOUT DESCRIPTION – PIC16F690. Now look at RA2 for what type of input T0CKI
is under the Input Type column.
Now look at RA5. When you use RA5 as a general purpose I/O-pin, it only needs TTL level
voltages. When you flip the switch to make it the Timer1 clock input, now it's a Schmitt
Trigger input.
Check out the BLOCK DIAGRAM OF RA5 to find out why.
It's all right there. Just takes time to learn how to find & decipher it all...;o}
And, when that doesn't work, download the latest Errata sheet for the PIC you're using.
Microchip screws up once in a while, and makes changes to datasheets....;o}




Bookmarks