rfPIC Serin problem


Closed Thread
Results 1 to 40 of 53

Hybrid View

  1. #1
    Join Date
    Sep 2004
    Location
    Mentor, Ohio
    Posts
    352


    Did you find this post helpful? Yes | No

    Smile

    Hi Medusa,

    I had this problem once and it turned out to be a subroutine that had a GOTO at the end of it instead of RETURN. Changed the word--solved the problem.

    HTH,

    BobK

  2. #2
    Join Date
    Nov 2007
    Posts
    11


    Did you find this post helpful? Yes | No

    Default

    thanks bobk..i tried that, put return at the end of each goto instruction i have, but still it has not succeeded. is it possible due to overflow stack?

    my program is supposed to have a stack of 8 byte output excluding the preamble and header and timeguard.

    does anyone ever write a program that has a subroutine as follows

    read input from port GPIO
    move data from GPIO to 'input' register
    take only data from bit 1
    store the input (bit 1)to bit 0 at another register

    repeat for eight times

    what i already have in mind

    movfw GPIO
    movwf input
    movlw 0000 0000
    xorwf input,f
    goto rotate

    rotate
    rrf input,f
    rrf input,f

    anyone has any idea to continue?

  3. #3
    Join Date
    Sep 2004
    Location
    Mentor, Ohio
    Posts
    352


    Did you find this post helpful? Yes | No

    Smile

    Hi Medusa,

    That's not what I meant. If you are calling a subroutine then at the end of the subroutine you put a RETURN. GOTO does not go at the end of a subroutine. This was the problem I had with one of my projects (18F452). The stack overflow was causing my project to hangup when it got to the subroutine after the stack overflowed. This was the only point I was trying to make.

    If you have both a GOTO and a RETURN then you might still be experiencing a problem.

    HTH,

    BobK

Similar Threads

  1. Serin Problem with 12F629/PBP
    By Flyingms in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 9th March 2009, 14:59
  2. Serin Problem 16f819
    By jjohannson in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 22nd March 2007, 22:50
  3. Serin serout problem
    By lerameur in forum mel PIC BASIC Pro
    Replies: 336
    Last Post: - 6th February 2007, 04:25
  4. Problem with PBP interrupt and Serin, please help
    By rgregor in forum mel PIC BASIC
    Replies: 0
    Last Post: - 22nd August 2006, 19:02
  5. serout and serin problem
    By nicolelawsc in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 11th April 2006, 19:44

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