time measurement between 2 pulses


Results 1 to 11 of 11

Threaded View

  1. #5
    Join Date
    Apr 2010
    Posts
    13


    Did you find this post helpful? Yes | No

    Default

    Wonderful!!It seems very simple of the way that you indicate to me. I have proven it and works perfectly. The only problem that I see is that to very low frecuency (< 1Hz ) it value is erroneous and to high frequencies (> 1 kHz) the read value is erroneous too.

    Code:
    pulsHi var word
    pulsLo var word
    Time var word
    
    
    MeasLoop:
    
    Pulsin PortB.0,1,PulsHi
    RCTime PortB.0,0,Pulslo
    
    Time = PulsHi+PulsLo
    
    LCDOut $FE,1, dec Time ' etc,etc ...
    
    Goto measLoop
    Thank you very very much Alain!!!!

    Flavio
    Last edited by xvladx; - 15th April 2010 at 21:47.

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