serin timout not going to correct lable


Closed Thread
Results 1 to 2 of 2
  1. #1
    Join Date
    Aug 2009
    Location
    Paso Robles California
    Posts
    153

    Post serin timout not going to correct lable

    below is a serin2 statement that seems to start back at version rather than go to die is there something I'm missing


    VERSION:
    B = 1
    GOSUB FLASH
    PAUSE 500
    B = 1
    GOSUB FLASH
    PAUSE 500
    B = 3
    GOSUB FLASH
    PAUSE 500
    LOW PORTA.5
    GOTO UNIT_TYPE

    Die:
    PAUSE 2000
    B = 5
    GOSUB FLASH
    PAUSE 1000
    B = 5
    GOSUB FLASH
    PAUSE 1000
    LOW PORTA.5
    END

    unit_type:
    FOR Z = 1 TO 16
    SERIN2 PORTA.1,16468,1000, Die,[HEX1 X0(Z)] 'GET BYTE 1 DATA
    SEROUT2 PORTA.0,16468,[HEX1 X0(Z)] 'SEND BACK BYTE 1 ECHO
    NEXT Z

  2. #2
    Join Date
    Apr 2011
    Location
    Kent, UK
    Posts
    52


    Did you find this post helpful? Yes | No

    Default Re: serin timout not going to correct lable

    Is the data input line (RX) idling low (9600 baud, inverted)? If not then then it will never time out!

Similar Threads

  1. "gosub" to lable in included file?
    By amgen in forum mel PIC BASIC Pro
    Replies: 6
    Last Post: - 5th August 2011, 20:44
  2. Is it a correct way to deal with an interrupt?
    By financecatalyst in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 15th November 2009, 22:44
  3. correct my code for 16f84.....
    By kvrajasekar in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 30th August 2008, 12:11
  4. Is this the correct PIC?
    By The Master in forum Off Topic
    Replies: 8
    Last Post: - 6th May 2008, 16:44
  5. Correct syntax please ?
    By malc-c in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 11th June 2006, 09:09

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