Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
medallo21 said:Hummm, is nothing no based on tmro.
Nigel Goodwin said:TMR0 is the most useless of the timers, I would suggest you use the far better TMR2 instead, which is used in the 7 segment and 8x8 LED tutorials for the multiplexing.
blueroomelectronics said:I like TMR0
With a proper crystal it's makes an awesome RTCC timebase Jiffy, it's lack of love means it's almost always available.
blueroomelectronics said:What limitations? With a proper crystal like 9.8304MHz it works like a charm, serial ports too.
Nigel Goodwin said:Check the technical bulletins, for an accurate RTCC you have to compensate for the manual reloading of the timer, there was loads about it on the PICList back in the distant past.
//timer 0 prescaller set to 16
Interrupt{
if(TMR0IF){
ticks-=4096;
if(ticks<0){
ticks+=1000000;
Seconds++;
}
TMR0IF=0;
}
}
//or, to keep to integers,
Interrupt{
if(TMR0IF){
ticks-=64;
if(ticks<0){
ticks+=15625;
Seconds++;
}
TMR0IF=0;
}
}