Hi Ben,

>>first reset (because I can only count up to 256 in one variable), and so on ...<<

Last time i checked a WORD sized variable could count up to 65535. Apart from that you're on the right track.

>>I'm planning t generate a clock at betweeen 1Hz-->10Hz.
Does this sound reasonable?<<

It sure does, 1 to 10 Hz should be no problem. Just make sure your mainprogram loops fast enough.

>>I've come across Prescalers in some literture as well, but it is all a bit confusing<<

A prescaler slows down the clocksignal to the timer. If you set the prescaler to 1:2 your timer will count at half the speed. With 1:8 it will ofcourse be 8 times slower. With no prescaler th timer will increment once evrey 1/4 of your oscillatorspeed.

I thought i'd give you some advice but i can't find a pic called 16F768. Not a big problem since the timers are very similar throughout the entire 16(and 12) series. I'll also assume that you're running it at 4MHz. Your "instructionclock" will be 4MHz/4=1MHz, this is your timebase.

Using Timer1 to get 10Hz.
Set the prescaler to 1:2 and let the timer count 50000 steps. Since the timer only count upwards you'll need to "preset" it to 65536-50000=15536. Or you could set the prescaler to 1:4 and count 25000, or prescale to 1:8 and count 12500.

Using Timer1 to get 4Hz.
Prescale to 1:4 and count 62500 steps or prescale to 1:8 and count 31250 steps.

Using Timer1 to get 2Hz.
Prescale to 1:8 and count 62500 steps.

We have now almost reached the limit of timer1. To get it even slower you'll need to use a software counter(postscaler) just like you described earlier. The actual limit of the hardwarecounter is OSC/4/8/65536, with 4MHz that equals 1.90735Hz.

You could also use Timer2 but this timer can't go lower than OSC/4/16/256/16, with 4MHz that's 15,259Hz. You quickly realize that you must use a software postscaler to get down to your 10Hz.

Timer0 can be used but i don't recomment it. It shares it's prescaler with the WDT. You could "steal" it from the WDT but then the WDT must be disabled. If you do that the pic won't be able to recover(reset) if your program hangs.

/Ingvar