TMR0 stops working


Closed Thread
Results 1 to 26 of 26

Hybrid View

  1. #1
    Join Date
    Jun 2006
    Location
    Bangalore, India
    Posts
    136


    Did you find this post helpful? Yes | No

    Post

    16F628A has been running stable for 10 days now.(Tried doing all sorts of things to make it reset, but its immunity is really good).
    So i guess the only solution is to stick with the 16F628A . . .
    Last edited by shahidali55; - 8th February 2008 at 17:46.

  2. #2
    Join Date
    Jun 2006
    Location
    Bangalore, India
    Posts
    136


    Did you find this post helpful? Yes | No

    Question

    My problem is still very much alive.
    I had turned off the clock for over a month.
    Now the clock "locks up" within 48 hours.
    It has locked up twice at 7 hours , 14 minutes (7:14).
    The mux routine works fine but the ISR just stops updating timing registers.
    (The varibles that handle this are bres_hi ,bres_mid ,bres_lo.)
    (uC is 16F628A and TMR0 used ot keep time)

  3. #3
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959


    Did you find this post helpful? Yes | No

    Default

    I'm still thinking it's related to voltage.

    The device is being powered by 3.6V
    But the 16F84A is only specified to work down to 4.5V

    In post #3 you said the datasheet specifies 2.0V
    But that's only for the 16LF84A

    Edit: Doh! You're using the 628 now. Nevermind.
    <br>
    Last edited by Darrel Taylor; - 14th June 2008 at 21:06. Reason: 628-doh
    DT

  4. #4
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959


    Did you find this post helpful? Yes | No

    Default

    shahidali55,

    Do you have an updated program?
    I tried to compile the program from post#1, but it has too many errors.

    It also has the pushbuttons on the same pins as the segments, and ASM opcodes in column 1.
    <br>
    DT

  5. #5
    Join Date
    Jun 2006
    Location
    Bangalore, India
    Posts
    136


    Did you find this post helpful? Yes | No

    Default

    Hello Darrel,
    As you suggested in post 2, the battery now charges from output from the 5v regulator (through a diode and a 2.2k resistor). The voltage at the PIC never rises above 4.6v. I tested this system with a 20v DC supply and the voltage at the pic pins is still at 4.63 volts (after 48 hours of running).

    I have attached a copy of the file with the required include (Instant interrupts) as a zip archive.
    The pushbuttons are not a concern now since the primary function of the device itself
    (i.e. keeping time) is not met.

    Is ASM opcodes in column 1 bad ?
    Attached Files Attached Files

  6. #6
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by shahidali55 View Post
    I have attached a copy of the file with the required include (Instant interrupts) as a zip archive.
    I don't understand why you've modified DT_INTS-14 like that. There's no need.
    I also don't like modified versions being posted on the Internet. Somebody will download it, it won't work, and then they'll blame me.

    Is ASM opcodes in column 1 bad ?
    Yes! Very BAD!
    ONLY Labels can go in the first column of ASM code.
    This applies to lines using the @ sign too. There must be a space after the @. (unless it's a label)

    With opcodes in column 1, the program won't compile. So that can't be the program you are currently running in the chip.

    DT

  7. #7
    Join Date
    Jun 2006
    Location
    Bangalore, India
    Posts
    136


    Did you find this post helpful? Yes | No

    Default

    Strange . . .
    Compiles fine for me.
    I have corrected the OPCODE in column 1 errors and attached another copy of the file.
    Sorry for modifying DT_INTS-14 , it it your work and i respect that. I modified it in my frustating attempts to correct the resetting and locking up of the chip.
    (still getting 3 warnings though)
    Attached Files Attached Files

Similar Threads

  1. COUNT is not counting again
    By jellis00 in forum mel PIC BASIC Pro
    Replies: 33
    Last Post: - 19th June 2009, 05:52
  2. TMR0 interrupt and HSERIN
    By boban in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 2nd September 2008, 12:48
  3. help: TMR0 interrupts disabling PORTAchange interrupts???
    By xnihilo in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 19th August 2008, 16:10
  4. using TMR0 as a counter..
    By sirvo in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 28th July 2007, 03:56
  5. Strange behaviour from PIC16F877 on TMR0
    By mikebar in forum mel PIC BASIC Pro
    Replies: 18
    Last Post: - 19th August 2006, 02:31

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