measure pulse width 0-150Hz


Closed Thread
Results 1 to 2 of 2
  1. #1
    kewetman's Avatar
    kewetman Guest

    Default measure pulse width 0-150Hz

    Hi All

    i'am new in picbasic pro.

    can somebody help me with some code, to measure 0-150Hz with 1Hz steps.

    i'am using and pic18f452 10Mhz

    i think that the program should use interupt, because the mcu has other jobs to do.

    if anyone have an example or good idea. please let me now.

    best regards
    From Denmark

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


    Did you find this post helpful? Yes | No

    Default

    Not sure if you want to measure Pulse Width or Frquency, but here's a start.

    If you need acurracy, you should use the Capture Mode of a CCP module.
    First one has an Instant Interrupt example too. ;)
    http://www.picbasic.co.uk/forum/showthread.php?p=23401 (Bruce)
    http://www.picbasic.co.uk/forum/showthread.php?p=41621 (Bruce)

    Or, you can get pretty good results with a Timer and interrupts ...
    http://www.picbasic.co.uk/forum/showthread.php?t=1044 (mister_e)
    http://www.picbasic.co.uk/forum/showthread.php?p=16636 (mister_e)
    <br>
    DT

Similar Threads

  1. Replies: 3
    Last Post: - 13th September 2008, 17:40
  2. PIC12f675 timer1 pulse width
    By ck1223 in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 15th February 2006, 04:05
  3. pulse width modulation
    By cheznez in forum mel PIC BASIC Pro
    Replies: 8
    Last Post: - 16th February 2005, 17:14
  4. Pulse Width Measurement
    By atomski in forum mel PIC BASIC Pro
    Replies: 17
    Last Post: - 29th January 2005, 00:53
  5. Pulse measure
    By Acetronics2 in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 11th August 2004, 06:14

Members who have read this thread : 1

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