weird pulsout problem


Closed Thread
Results 1 to 5 of 5
  1. #1

    Default weird pulsout problem

    Hi Everyone. I've used the pulsout command many times with no problems except yesterday. I used it on a 16F819 and the pulse width was 1/2 of what it should have been. I fixed the problem by putting a pause 10 before the pulsout command and another one after it. Any ideas? I never had to do this with a 16F73.

  2. #2
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,614


    Did you find this post helpful? Yes | No

    Default Re: weird pulsout problem

    may we have a code snippet + your configs ???

    Alain
    ************************************************** ***********************
    Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
    ************************************************** ***********************
    IF there is the word "Problem" in your question ...
    certainly the answer is " RTFM " or " RTFDataSheet " !!!
    *****************************************

  3. #3
    Join Date
    Sep 2010
    Posts
    50


    Did you find this post helpful? Yes | No

    Default Re: weird pulsout problem

    Are both running at the same oscillator frequency?

  4. #4


    Did you find this post helpful? Yes | No

    Default Re: weird pulsout problem

    Sorry for the late reply. I shortened the program to only 1 activation so it wouldn't take up a lot of space. The top program is the main circuit that only has one available port to pulsout which is RB0. The bottom program is the "slave" circuit which activates things like a motor or series of LED's. I've used this system before with a 16F73 without any problem but when I use the 16F819, I have to put a pause 10 before and after the pulsout otherwise the pulse is about 1/2 the width it should be. And yes both chips are running at 4MHZ. I solved the problem with the pause commands but am interested in why it is necessary for just the '819.
    'main program
    START:
    NAP 0
    IF PORTA.1 = 0 Then ONE
    GoTo START
    ONE:
    LET ADDRESS = 0
    Pause 10
    PulsOut PORTB.0,100
    Pause 10
    GoTo PLAY
    'slave program
    START:
    PulsIn PORTA.0,1,WIDTH 'LOOKING FOR A HIGH PULSE
    IF WIDTH > 90 AND WIDTH < 110 Then activate1 'LOOKING FOR 1MS = 1000uS
    GOTO START
     

  5. #5
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,614


    Did you find this post helpful? Yes | No

    Default Re: weird pulsout problem

    Hi,

    Try :

    Code:
    LOW PORTB.0
    PulsOut PORTB.0,100
    BTW : what kind of load is connected to that Port pin ???

    Alain
    ************************************************** ***********************
    Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
    ************************************************** ***********************
    IF there is the word "Problem" in your question ...
    certainly the answer is " RTFM " or " RTFDataSheet " !!!
    *****************************************

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