RTC via TMR0 + HSERIN and 16F916


Closed Thread
Results 1 to 6 of 6

Hybrid View

  1. #1
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by mister_e View Post
    AND you have to add the ON INTERRUPT latency
    But in this case, latency shouldn't really matter, 'cause the interrupt stubs isn't going to take anywhere near the total period of the interrupt (well, shouldn't anyways), T0 isn't being stopped by anything...

    And yes, DT's INTs and Elapsed Timer...always a good plan...

  2. #2
    Join Date
    Jan 2007
    Posts
    39


    Did you find this post helpful? Yes | No

    Default OPTION_REG = $d5 and ticks => 61

    Hello Skimask,
    thanks a lot for your help, I see.
    I am thinking that the easyest way to solve my problem is to use

    OPTION_REG = $d5

    disable
    intManagement:
    if (INTCON.2 == 1) then
    ticks = ticks + 1 ' Count pieces of seconds
    If ticks >= 61 Then
    if (ACTIVITY_LED == 1) then
    low ACTIVITY_LED
    else
    high ACTIVITY_LED
    endif
    ticks = 0 'One second elasped - update time
    manageIntSecond = 1
    endif
    INTCON.2 = 0
    endif
    INTCON.7 = 1
    resume

  3. #3
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    All other things being equal, that would give you roughly 49-50 seconds of slow error per day. Add one second every half hour, and you'll practically be dead on.

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts