cancel
Showing results for 
Search instead for 
Did you mean: 

ST7FLITE2 autoreload timer....doesn't

derek1
Associate II
Posted on October 22, 2003 at 13:19

ST7FLITE2 autoreload timer....doesn't

2 REPLIES 2
derek1
Associate II
Posted on October 22, 2003 at 12:43

I've had no problem with the two lite timers, but I want to use the 12bit autoreload timer to interrupt on overflow. This is so i can divide exactly and still awake from active halt.

It just doesn't seem to interrupt (even if I don't 'halt')

I'm running off a 32khz crystal, trying to run slow and halt a lot to save power zzzzzzzzzz!

Here's my set up code.

PADDR=0x07; // Configure PA0,1,2 O/P PAOR=0x07; // similar to ex1

PADR=0x07; // LEDS ON

PBDDR=0x00; // Configure PB0..7 I/P

PBOR=0x00; // floating

ATRH=0x0B; // reload value for timer

ATRL=0xFF; // reload value for timer

ATCSR=0x0A; //ENABLE 12 bit TIMER INTERUPT

Ta for any help/suggestions

Del the Cat
derek1
Associate II
Posted on October 22, 2003 at 13:19

Found it. The counter doesnt reload until AFTER the first overflow.

This means the first period is very long when working at 32Khz!

I was after a 1second interrupt...more like 5 mins!

Peace and chill

Mioaww