AnsweredAssumed Answered

ADuc845 Time Inetval Counter

Question asked by BILLHARMON on Nov 5, 2012
Latest reply on Nov 5, 2012 by AudeR

I’m attempting to implement the TIME INTERVAL COUNTER to generate a reoccurring interrupt.

The data sheet is not specific enough to facilitate this.

 

Specifically I need to know what is required to generate a reoccurring interrupt using the TIME INTERVAL COUNTER.

I can get the first interrupt to occur but a second never occurs.

 

Here are the TIC registers as I am currently using them;

 

INTVAL = 16;    
            //.125 SEC INTERVAL

 

TIMECON =
0x13;          // ITS0 TIEN TCEN = 1

 

void TIC_ISR (void)
interrupt 11

{

 

TIMECON = 0x13;
         // ITS0 TIEN TCEN = 1

 

Secs +=
.125;               // Secs is a global float
varaible

 

}

 

Page
70 of the ADuC845 data sheet specifically states “ THE USER MUST ENSURE THAT
SUCEFICANT TIME IS GIVEN FOR THESE ( TIC REGISTERS) INSTRUCTIONS TO EXECUTE”.

 

But it does not give any information to determine what this “TIME TO EXECUTE” is.

 

Questions:

 

  1. How do I determine the correct time to allow for TIC register execution?
  2. Do I need to reload the TIMECON register every interrupt?
  3. Is it possible to use the TIME INTERVAL COUNTER to generate reoccurring interrupts every .125
    sec?
  4. What is are the correct register settings to facilitate this?

Outcomes