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

    Default

    Thanks for that Darrel . . .
    I've added a .1uf from MCLR to ground, 1k from buttons to VCC. Datasheet states minimum operating voltage is 2 volts. (http://ww1.microchip.com/downloads/e...doc/35007b.pdf)
    Sometime back i have also run the clock from a 12 volt lead acid battery (with 7805).
    After 3 days, the clock stopped incrementing time, though the display was being multiplexed and the input buttons responded fine.
    16F628A also shows the same behavior.
    I tried writing a piece of code that resets all TMR0 registers and variables when the time set button is pressed, but no matter what ,TMR0 doesn't seem to come to life until a powerdown reset is done.
    Last edited by shahidali55; - 25th January 2008 at 07:38.

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


    Did you find this post helpful? Yes | No

    Default

    I think i have found the fault...
    Sometimes when i turn on the tubelight in my room, the clock resets or hangs or stops incrementing time,even tough i'm power it from a battery.
    Does this mean that i have to provide RF shielding to the PCB ? ? ?

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


    Did you find this post helpful? Yes | No

    Default

    I have a similar problem with my breadboards, ... when I turn on the fluorescent light on my desk.

    I pretty much ignore it (mostly because I can't fix it).

    It doesn't seem to be related to proximity, but seems to be related to it being plugged into the same "Power Strip" as the project.

    If I plug the project into the wall, and the light into the power strip, it doesn't happen.

    Surely there's an explanation .. (that will surface real soon).
    <br>
    DT

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


    Did you find this post helpful? Yes | No

    Default

    It happens even if i run the clock from a battery.
    It sometimes locks up when i plug in the cellphone charger adapter.
    Will decoupling capacitors or line filters help?

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


    Did you find this post helpful? Yes | No

    Default

    If you don't have decoupling capacitors, it could be a problem.

    I usually put a .1uF (100nf) across the power rails for every 2-3 chips.
    Some people say 1 cap per chip, but I think that's a little more than necessary.

    You shouldn't need RF sheilding.
    <br>
    DT

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


    Did you find this post helpful? Yes | No

    Post

    Decoupling capacitors don't seem to help . . .
    Using the 16F628A with MCLR disabled while programming solves the problem (for now)...

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


    Did you find this post helpful? Yes | No

    Default

    Hi shahidali55,
    If your display is large and has long wires , it may well be acting as an antenna, try decoupling caps on each output line going to it, as well as any inputs, also try hooking all ground connections to a single ground connection, as ground loops often cause electronic circuits to oscillate, That is what they used to do in high end audio gear.
    HTH
    JS
    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.

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