Timer Issues


Results 1 to 5 of 5

Thread: Timer Issues

Threaded View

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

    Default Timer Issues

    Correct me if i'm wrong, but I should be able to set the value of TMR0L and TMR0H to whatever I like yes?

    If I do this as a test:

    Code:
    DEFINE OSC 48
    
    T0CON=%10010110
    
    TMR0L=0
    TMR0H=0
    
    pause 200
    
    result.LowByte=TMR0L
    result.HighByte=TMR0H
    The result varies every time i do it. As if reseting TMR0L and TMR0H is doing nothing.

    However if I do this:


    Code:
    DEFINE OSC 48
    
    T0CON=%10010110
    
    result1.LowByte=TMR0L
    result1.HighByte=TMR0H
    
    pause 200
    
    result2.LowByte=TMR0L
    result2.HighByte=TMR0H
    
    result=result2-result1
    The result is correct every time.

    Does anyone know why?
    Last edited by Kamikaze47; - 7th September 2007 at 13:36.

Similar Threads

  1. Elapsed Timer Demo
    By Darrel Taylor in forum Code Examples
    Replies: 111
    Last Post: - 29th October 2012, 17:39
  2. Timer + rc5
    By naga in forum mel PIC BASIC Pro
    Replies: 8
    Last Post: - 19th November 2009, 07:56
  3. Understanding timer issues
    By boroko in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 7th April 2009, 02:56
  4. Timer interrupt frequency
    By Samoele in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 17th January 2009, 23:49
  5. timer interupt help 16f73
    By EDWARD in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 3rd July 2005, 08:41

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