Hello Poomima,
I don't think that it is possible to directly achieve a 1 minute TPM overflow period with a bus frequency of 8MHz. However, if a much shorter TPM overflow period, perhaps 10 milliseconds, is generated, a one minute timeout period could then be achieved by counting every 6000 overflows.
With a bus frequency of 8 MHz, a TPMMOD setting of 39999 and a prescale value of 2 should give 10 ms overflow period.
Using an 16-bit global variable tcount, the TPM overflow ISR then might incorporate the following code snippet:
tcount--;
if (tcount == 0) {
tcount = 6000;
SPI_process();
}
Regards,
Mac
Message Edited by bigmac on 2009-08-18 05:07 AM