Funny PULSIN values: what is going on???


Closed Thread
Results 1 to 6 of 6

Hybrid View

  1. #1
    xnihilo's Avatar
    xnihilo Guest


    Did you find this post helpful? Yes | No

    Smile help

    Can someone please help me?

  2. #2
    Join Date
    Mar 2006
    Location
    Pennsylvania, USA.
    Posts
    130


    Did you find this post helpful? Yes | No

    Default

    I don't know if this will help or not, but Bruce put together a nice little program here;
    http://www.picbasic.co.uk/forum/showthread.php?p=23401
    I'm not familiar with the PIC you're using, but if you have a CCP module I would give Bruce's program a shot, it looks like it should be very accurate.
    Hope this helps.
    Jerry.
    If your oscilloscope costs more than your car...

  3. #3
    xnihilo's Avatar
    xnihilo Guest


    Did you find this post helpful? Yes | No

    Smile PULSIN: darrel, miser-e, Mc crackit..???

    "I need to time an incoming pulse that can be anywhere from 35 to 1000 mS long"...

    My pulses are 600 or 1200 us long... There is a problem with PULSIN or with the hardware, I can't understanf why I have such fluctuation...

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


    Did you find this post helpful? Yes | No

    Default

    I think there's several sources of the variances.
    But a large portion is probably because TMR2 is left running when you turn off the CCP module.

    When you put it back in PWM mode again, TMR2 is at an unknown value, and if it's over 49 (PR2) then it could take up to 100us for it to roll-over to 0 again.

    When you turn off the PWM, you should Stop TMR2 and reset it to 0.

    added: Or maybe just zeroing TMR2 before starting the PWM will work.
    <br>
    Last edited by Darrel Taylor; - 29th April 2008 at 10:17. Reason: .
    DT

  5. #5
    xnihilo's Avatar
    xnihilo Guest


    Did you find this post helpful? Yes | No

    Smile You are a god :)

    I will give it a try.
    Thanks.

Similar Threads

  1. Replies: 17
    Last Post: - 12th April 2014, 02:17
  2. Better understanding PULSIN
    By Wirecut in forum mel PIC BASIC
    Replies: 12
    Last Post: - 29th June 2008, 10:17
  3. Pulsin 16F819 problem
    By rekcahlaer in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 11th April 2007, 13:52
  4. Pulsin to pulsout with up than 4MHZ crystal ?
    By RCtech in forum mel PIC BASIC
    Replies: 5
    Last Post: - 18th May 2006, 19:23
  5. PULSIN and RCTIME
    By Dwayne in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 4th November 2004, 14:45

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