Pulsin


Closed Thread
Results 1 to 8 of 8

Thread: Pulsin

Hybrid View

  1. #1


    Did you find this post helpful? Yes | No

    Default

    I got the ccp interupt working on the 12f683 and i am able to count the pulse width, period, etc with it. but i need to count the pulse on 6 different pins and i could only use the ccp interupt on the ccp pin. therefore i though i should use the "pulsin" to count the pulses so i can use multiple pins.

    i could use "pulsin" on any pin and as many pins i want right? the minimum pulse width is 25us and the maximum pulse is 16.5ms on the system that im trying to interface. do you have any suggestions as to what size crystal i should get? i think im gonna stick with the pic16f84A for this project. it has 13 different I/Os 6 of which are going to be input from the pulses.

  2. #2
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by jmbanales21485 View Post
    I got the ccp interupt working on the 12f683 and i am able to count the pulse width, period, etc with it. but i need to count the pulse on 6 different pins and i could only use the ccp interupt on the ccp pin. therefore i though i should use the "pulsin" to count the pulses so i can use multiple pins. i could use "pulsin" on any pin and as many pins i want right? the minimum pulse width is 25us and the maximum pulse is 16.5ms on the system that im trying to interface. do you have any suggestions as to what size crystal i should get? i think im gonna stick with the pic16f84A for this project. it has 13 different I/Os 6 of which are going to be input from the pulses.
    You could 'steer' the different pulses to the ccp pin using a simple logic gate, something like a 2 input AND gate, one input tied to an 'enable' pin, the other input tied to the actual input pulse.

    - Pulsin can be used on as many pins as can be set to inputs.

    - If you used a 20Mhz oscillator, the pulsin resolution is 2us... Therefore, at 25us, you'll get either 12 (24us) or 13 (26us) counts; at 'exactly' 16.5ms (16,500 us), you'll get 8,250 counts.
    (Theoretically, and if the PIC supported it, you should be able to go all the way up to 80Mhz...25us=100 counts, 16,500=33,000 counts).

  3. #3
    Join Date
    Dec 2005
    Posts
    1,073


    Did you find this post helpful? Yes | No

    Default

    PulsIn ties up the processor for the duration of the pulse. Without knowing the details of the application it's hard to say for certain but it's not a good choice if you need to count pulses on multiple pins simultaneously.

Similar Threads

  1. Better understanding PULSIN
    By Wirecut in forum mel PIC BASIC
    Replies: 12
    Last Post: - 29th June 2008, 10:17
  2. Funny PULSIN values: what is going on???
    By xnihilo in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 30th April 2008, 08:02
  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