Not just another TMR q


Closed Thread
Results 1 to 7 of 7

Hybrid View

  1. #1
    Join Date
    May 2004
    Location
    New England
    Posts
    164


    Did you find this post helpful? Yes | No

    Default

    HI Melanie - just curious, isn't that more-or-less what the PBP "SLEEP" command does?
    Also, seems like he'd still have the inaccuracy of the WDT clock to deal with (variance between devices, etc).

    Arch
    "Data sheets? I ain't got no data sheets. I don't need no data sheets. I don't have to read any stinking data sheets!"

  2. #2
    Join Date
    Jul 2003
    Posts
    2,358


    Did you find this post helpful? Yes | No

    Default

    Yes, in a way. PICBasics SLEEP uses the WDT but doesn't cause a WDT event. I was actually thinking about causing a WDT to happen... but yes you're right, both methods rely on the WDT oscillator which isn't too hot on accuracy.

    Without adding external Hardware, we're in trouble here trying to maintain accurate timing whilst in a Low-Power quiesce mode. Lots of things 'should have' been designed in... if I was doing this, I'd probably run my application at sub 100kHz and have chosen one of the better Micropower PICs, and/or have an external RTC that could wake me every second. But Brad's stuck with an existing design and has to make the best.

    Best thing to do, if Power is really an issue, is to switch all I/O's to ensure there's minimal current drain, and run the PIC at the slowest clock rate you can get away with. If that means a 32kHz xtal and having to manually work-out Pauses and Timings for PBP, then so be it.

  3. #3
    Join Date
    May 2005
    Location
    Minnesota
    Posts
    31


    Did you find this post helpful? Yes | No

    Default Thanks for the quick response

    Melanie-Thanks again for the fast responses.

    I'll try your suggestion counting WDT events.

    Max time in sleep mode is closer to 2 hours, not 5, and the timer/clock will be reset at least once a day so accumulative time errors will not exist past the end of say 16 hours of continous operation.

    I was hoping you would suggest some of your code from the Olympic Timer project. I saw something that might work at this link http://www.picbasic.co.uk/forum/showthread.php?t=603

    What do you think?

    B

  4. #4
    Join Date
    Jul 2003
    Posts
    2,358


    Did you find this post helpful? Yes | No

    Default

    Yes, my Timer Code will happilly work for you but not when the PIC sleeps, and I thought you wanted to conserve power by sleeping?

Similar Threads

  1. Elapsed Timer Demo
    By Darrel Taylor in forum Code Examples
    Replies: 111
    Last Post: - 29th October 2012, 17:39
  2. internal TMR for frequency output
    By Samoele in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 15th January 2009, 09:38
  3. Why does TIMER slow down when using longer pause
    By GrandPa in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 6th July 2007, 00:35
  4. How to use TMR command?
    By Samoele in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 28th January 2007, 21:37
  5. Can a TMR interrupt stops HSERIN?
    By SergioRM in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 24th January 2006, 01:07

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