Timer problem


Closed Thread
Results 1 to 3 of 3

Thread: Timer problem

Hybrid View

  1. #1
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Kamikaze47 View Post
    At 128uS per tick of the timer, i'd expect a result of about 8, however I get 95.
    At 48Mhz...
    Each MCU instruction cycle = .083us ( 1/ (48mhz/4) )
    .083us * 256 for the Timer 0 prescaler = 21.3us
    2048 us pause / 21.3 us per T0 tick = 96

  2. #2
    Join Date
    Nov 2005
    Location
    Perth, Australia
    Posts
    429


    Did you find this post helpful? Yes | No

    Default

    *slaps forehead*

    I'm not sure how I ended up with 128uS/tick... I must have worked it out on a 8Mhz clock instead of 48Mhz.

    thanks skimask
    "I think fish is nice, but then I think that rain is wet, so who am I to judge?" - Douglas Adams

Similar Threads

  1. Elapsed Timer Demo
    By Darrel Taylor in forum Code Examples
    Replies: 111
    Last Post: - 29th October 2012, 18:39
  2. Timer + rc5
    By naga in forum mel PIC BASIC Pro
    Replies: 8
    Last Post: - 19th November 2009, 08:56
  3. Timer interrupt frequency
    By Samoele in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 18th January 2009, 00:49
  4. Interesting delay problem
    By Kreston in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 1st September 2008, 15:41
  5. Timer problem
    By Tastature in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 31st July 2008, 20:38

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