TMR0 stops working


Closed Thread
Results 1 to 26 of 26

Hybrid View

  1. #1
    Join Date
    Aug 2006
    Location
    Look, behind you.
    Posts
    2,818


    Did you find this post helpful? Yes | No

    Default

    Hi shahidali55,
    On the perfboard I would probably run a buss wire lengthwise under the pic and from each pin I would add .o1uf or even .001 uf capacitors to the buss wire which is hooked up to ground, I think you are getting RF into the chip from the outputs, RF is funny, it sort of crawls on the outside of conductors and does funny things. AS for things like cellphone chargers emitting RF I guess it depends upon which country's emission standards they meet or fail to meet. You might try using 2 bypass caps, 1 from each leg of the Mains power to ground right at the outlet. Ferrite beads are useful to trap RFI on wires on the circuit board. Be sure they are made for that high of a voltage,otherwise they pop like firecrackers Some links on RFI:

    http://www.edn.com/archives/1995/010595/01df1.htm
    http://www.eham.net/articles/12139
    Last edited by Archangel; - 29th January 2008 at 08:02.
    If you do not believe in MAGIC, Consider how currency has value simply by printing it, and is then traded for real assets.
    .
    Gold is the money of kings, silver is the money of gentlemen, barter is the money of peasants - but debt is the money of slaves
    .
    There simply is no "Happy Spam" If you do it you will disappear from this forum.

  2. #2
    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 16:46.

  3. #3
    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)

  4. #4
    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 20:06. Reason: 628-doh
    DT

  5. #5
    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

  6. #6
    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

  7. #7
    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

Similar Threads

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