Elapsed Timer Demo


Results 1 to 40 of 112

Threaded View

  1. #14
    jessey's Avatar
    jessey Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Darrel Taylor
    Oops, sorry, forgot to answer that part. (DEC2)

    You should only have to reset GIE before reading the sensor.

    INTCON.7 = 0
    OWIN ....
    INTCON.7 = 1

    Not sure what you did with the counter so I can't imagine what happened there.
    <br>

    Hi Darrel,

    I tried as you suggested and it's still giving me major problems. The counter does increment but it takes about 50 seconds to increment each second. The temperature seems to function ok, as when I touch the DS1820 it does increase the temp reading without any delays and all the buttons are working ok to enter the other subroutines and I can reset your clock ok as well.

    The only function that doesn't work, is that the heater doesn't shut off when the temperature is equal to or greater that the set reference that's suppose to shut it off.

    I have a Tocks counter that Gosubs the counter in the mainloop that's keeping time as well and it's functioning ok and keeping the proper time so it's a real puzzler. I tried "INTCON.7 = 0" before checking the temp and then instead of "INTCON.7 = 1" to turn it back on I used "Gosub StartTimer" figuring that something wasn't set proper, but still no go.

    It has to be something in the mainloop that's causing the havoc. I noticed that when I enter another subroutine from the mainloop that your clock counts the time ok because if I time the seconds that I'm out of the mainloop and when I return, then your counter has counted the time correctly and I can see the time has advanced on the Lcd.

    I've spent a couple of late nights going through my code thinking that I've got something in it that might be interfering with your counter but came up empty.

    I went through the data sheet again for the 16f877 and still can't figure it out. Would you have any ideas on what's happening to cause this? I've included my code this time and if you get a chance to look at it sometime I'd surely appreciate it.

    Thanks
    jessey
    Attached Files Attached Files
    Last edited by jessey; - 9th November 2005 at 11:51.

Similar Threads

  1. Instant Interrupts - Revisited
    By Darrel Taylor in forum Code Examples
    Replies: 772
    Last Post: - 17th February 2016, 22:14
  2. Get elapsed time while TIMER samples pulses
    By RodSTAR in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 27th March 2009, 16:27
  3. Elapsed Timer Demo in a PIC12F675
    By Leonardo in forum mel PIC BASIC Pro
    Replies: 16
    Last Post: - 21st November 2008, 00:01
  4. Totally Baffled with Elapsed Timer
    By CocaColaKid in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 11th June 2008, 21:01
  5. Darrel Taylor Elapsed Timer
    By rwskinner in forum mel PIC BASIC Pro
    Replies: 14
    Last Post: - 13th March 2008, 01:22

Members who have read this thread : 2

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