Interrupt RPM and Taylors Elapsed time on 18F4620


Results 1 to 40 of 71

Threaded View

  1. #25
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959


    Did you find this post helpful? Yes | No

    Default

    Proteus Rules.

    Here's what I found.
    After the capture was made, and the math completed, the result is displayed with a SEROUT2 to the LCD.

    But at 9600 baud, by the time it gets around to displaying CCPR1L and CCPR1H, multiple captures have taken place without Timer1 being cleared.

    If you use this line instead, you get the same numbers on both chips and they are the right ones.

    Code:
    SEROUT2 LCD,84, [Prefix,CursorPS,20,"RPM ",dec5 RPM, " ", DEC5 period]
    <object id='stUkhdQ01IR19bR15YXVpZVFJV' width='425' height='344' type='application/x-shockwave-flash' data='http://www.screentoaster.com/swf/STPlayer.swf' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,115,0'><param name='movie' value='http://www.screentoaster.com/swf/STPlayer.swf'/><param name='allowFullScreen' value='true'/><param name='allowScriptAccess' value='always'/><param name='flashvars' value='video=stUkhdQ01IR19bR15YXVpZVFJV'/></object><div style='width: 425px; text-align: right;'><a href='http://www.screentoaster.com/'>Capture your screen in seconds</a></div>

    My SEROUT2 was a little different ...
    SEROUT2 LCD,84, ["RPM ",dec5 RPM, " ", DEC CCPR1H<<8+CCPR1L," ",DEC period," Ovr:",BIN1 Overflow,13,10]

    The small pulse I measured was the time to do the math.
    The big pulse was the time for SEROUT2.
    The original SEROUT2 was shorter, and around 20mS.
    <br>
    Last edited by Darrel Taylor; - 29th January 2010 at 03:32. Reason: more more more
    DT

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