Skip to main content
Visitor II
October 22, 2003
Question

ST7FLITE2 autoreload timer....doesn't

  • October 22, 2003
  • 2 replies
  • 821 views
Posted on October 22, 2003 at 13:19

ST7FLITE2 autoreload timer....doesn't

    This topic has been closed for replies.

    2 replies

    derek1Author
    Visitor II
    October 22, 2003
    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
    derek1Author
    Visitor II
    October 22, 2003
    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