Replace PBP with Assembly concerning Timer0


Closed Thread
Results 1 to 14 of 14

Hybrid View

  1. #1
    Join Date
    Aug 2006
    Location
    In a world of german electrons
    Posts
    102


    Did you find this post helpful? Yes | No

    Default

    Difference of time(MyMethod <-> Timer0) is the linchpin of this thread. I can't see a connection between your post and the main question.

    This should not be measured. To calculate it, the timer0's speed is needed(How many cycles mean how many countings) and I want to know how fast my current implementation is(there is a number somewhere in the greatly written manual that states how much time these instructions take).

    Then I get a comparison.
    Last edited by selbstdual; - 21st February 2007 at 03:20.

  2. #2
    Join Date
    Feb 2005
    Location
    Kolkata-India
    Posts
    563


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by selbstdual View Post
    Difference of time(MyMethod <-> Timer0) is the linchpin of this thread. .
    As far as I understood you need to get the time elapsed between two states of your comparator. You can always get two intermediate readings. Get the difference between the readings. Even if prescale is 1:1 and you are using ASM interrupts then you know how may cycles you consumed to take a reading and asjust your results thus. This should give you far more accurate results than looping around. Cause you can just stop the timer at the comparator interrupt. Get the results. I suggested a pseudo 16bit because I don't know your possible timings between comparator changes. Thus timer zero may overflow. You did ask how to handle overflow!! With the additional Highbyte incrementing on overflow you do get a 16bit timer.
    Regards

    Sougata

Similar Threads

  1. Assembly Language inside PBP
    By Bill Legge in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 12th October 2009, 21:52
  2. Replies: 2
    Last Post: - 8th February 2009, 05:10
  3. 4 Chanel Dmx512 ready assembly code to PBP ?
    By syscoder in forum mel PIC BASIC Pro
    Replies: 10
    Last Post: - 21st March 2007, 23:55
  4. Passing arrays PBP <-> Assembly
    By Charles Linquis in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 16th April 2006, 01:01
  5. Assembly Language + PBP
    By Charles Linquis in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 10th January 2006, 13:54

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