Pulsin alternative


Closed Thread
Results 1 to 6 of 6
  1. #1
    Join Date
    Feb 2008
    Posts
    8

    Question Pulsin alternative

    is there such a a thing as a Pulsin alternative?
    i'm using a 12F675

    right now i have a chunk of code
    Code:
    radioIn:    
            PULSIN Radio,1,P        
            ' With 20 meg osc pulse measures at 2 millisecs, With 4 meg osc pulse measures at 10 millisecs
            PWM NpN, P, 100
        goto radioin
    Radio is defined as an input,on GPIO.3 save pulse as "P"
    PWM NpN is defined as an output on GPIO.2, use P as the PWM Duty, Cycle = 100 (also tried Cycle = 3, which had a better result)
    goto = do it forever

    OK, i am driving a 12V LED strip with a NPN Transistor. reading data from an R/C Airplane Receiver, this part works good

    the problem is that the pulsin command takes up a LOT of time, enough time that you can see the flicker in the LED's (try it it's enough to give you a seizure).

    is there an alternative to Pulsin that maybe can do its job a little faster?
    or is this where you are better off to find a chip with HPWM and go that route?

    thank you in advance

  2. #2
    Join Date
    Feb 2008
    Posts
    8


    Did you find this post helpful? Yes | No

    Default

    ok my problem is in my external components,
    i tried playing with the Define PULSIN_MAX that didn't work
    i swapped out my 1uf cap for a 4.7uf cap little change
    47uf cap great improvement, a little to much capacity though, it makes them sluggish to respond, I'm gona try a 10uf next and i bet that fixes it right up

  3. #3
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Switch over to a 12F683 and use the hardware PWM outputs

  4. #4
    Join Date
    Feb 2008
    Posts
    8


    Did you find this post helpful? Yes | No

    Talking

    sweet i'm pulling up the data sheet right now!!!
    Thank you!!

  5. #5
    Join Date
    Jul 2003
    Posts
    2,405


    Did you find this post helpful? Yes | No

    Default

    Look at the 12F615 too.
    Regards,

    -Bruce
    tech at rentron.com
    http://www.rentron.com

  6. #6
    xnihilo's Avatar
    xnihilo Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by sbobowski View Post
    is there such a a thing as a Pulsin alternative?
    i'm using a 12F675

    right now i have a chunk of code
    Code:
    radioIn:    
            PULSIN Radio,1,P        
            ' With 20 meg osc pulse measures at 2 millisecs, With 4 meg osc pulse measures at 10 millisecs
            PWM NpN, P, 100
        goto radioin
    Radio is defined as an input,on GPIO.3 save pulse as "P"
    PWM NpN is defined as an output on GPIO.2, use P as the PWM Duty, Cycle = 100 (also tried Cycle = 3, which had a better result)
    goto = do it forever

    OK, i am driving a 12V LED strip with a NPN Transistor. reading data from an R/C Airplane Receiver, this part works good

    the problem is that the pulsin command takes up a LOT of time, enough time that you can see the flicker in the LED's (try it it's enough to give you a seizure).

    is there an alternative to Pulsin that maybe can do its job a little faster?
    or is this where you are better off to find a chip with HPWM and go that route?

    thank you in advance
    The resolution of PULSIN is in US:
    "The resolution of PULSIN is dependent upon the oscillator frequency. If a 4MHz oscillator is used, the pulse width is returned in 10us increments. If a 20MHz oscillator is used, the pulse width will have a 2us resolution. Defining an OSC value has no effect on PULSIN."

Similar Threads

  1. Replies: 17
    Last Post: - 12th April 2014, 02:17
  2. 18f4550 USB and pulsin or pulsin alternative
    By vacpress in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 15th January 2009, 13:14
  3. Better understanding PULSIN
    By Wirecut in forum mel PIC BASIC
    Replies: 12
    Last Post: - 29th June 2008, 10:17
  4. Funny PULSIN values: what is going on???
    By xnihilo in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 30th April 2008, 08:02
  5. Pulsin 16F819 problem
    By rekcahlaer in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 11th April 2007, 13:52

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