Solved - ELAPSED TIMER: TimerConst not defined


Closed Thread
Results 1 to 12 of 12

Hybrid View

  1. #1
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    4,170


    Did you find this post helpful? Yes | No

    Default Re: ELAPSED TIMER: TimerConst not defined

    You beat me! Nice you found that detail! Hope it works OK now. But you use a 16F series chip not 18F.

    Ioannis

  2. #2
    Join Date
    Jan 2005
    Location
    Montreal, Quebec, Canada
    Posts
    3,172


    Did you find this post helpful? Yes | No

    Default Re: ELAPSED TIMER: TimerConst not defined

    Of course I had to open a can of worms.

    This thread goes into detail how Darrel's Elapsed timer is off by 1:

    The value he used for each of the Oscillator rates is (1) less than it should be.
    The reason is that he calculated the Timer1 counter overflow value as 65535 instead of using 65536.
    Timer1 is a 16bit counter from 0 to 65535.
    It takes 65536 counts to overflow (Wrap back to 0) and trigger the Timer1 interrupt.
    This means that his 10ms interrupt will actually run longer by (1) instruction than it should.
    https://www.picbasic.co.uk/forum/sho...789#post132789

    Note to self: TimerCalc is in MultiCalc by Mr. E; (Timer Helper).
    My Creality Ender 3 S1 Plus is a giant paperweight that can't even be used as a boat anchor, cause I'd be fined for polluting our waterways with electronic devices.

    Not as dumb as yesterday, but stupider than tomorrow!

Similar Threads

  1. Elapsed Timer findings
    By Art in forum General
    Replies: 47
    Last Post: - 23rd August 2024, 07:40
  2. PIC16F18855 and DT elapsed timer
    By nomada in forum PBP3
    Replies: 2
    Last Post: - 18th October 2018, 06:58
  3. DT Elapsed Timer
    By retepsnikrep in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 15th December 2017, 00:21
  4. SPWM and Elapsed Timer
    By CocaColaKid in forum mel PIC BASIC Pro
    Replies: 12
    Last Post: - 8th May 2008, 04:16
  5. DT Elapsed Timer
    By rwskinner in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 10th March 2008, 00:17

Members who have read this thread : 1

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