SERIN2 - "Timeout" hangs if > 255


Closed Thread
Results 1 to 9 of 9

Hybrid View

  1. #1
    Join Date
    Aug 2006
    Location
    SWITZERLAND (french speaking)
    Posts
    938


    Did you find this post helpful? Yes | No

    Default any signal or character string?

    Thanks mackrackit,

    For info, my GPS module sends data @ 1Hz interval. As long as I set my timeout value < 255, the expected result will occur.

    Are your saying that timeout will not work if the expected character string OR any signal is received whithin the timeout value? I'm confused.

    I use this modified (in red) routine to check if a particular NMEA sentence is sent by the GPS module. In that way, SERIN2 will receive signals and still have the timeout (<255) working - or is this test not valid?
    Code:
    CHECK_GGA:
    SERIN2 GPSfrom,Gpsbps,Timeout,NoGGA,[WAIT("$GPxxxGGA")]
    GOTO GPGGA:
    NoGGA:
    LCDOUT $FE,2, "no xxx"
    PAUSE 500
    SEROUT2 GPSto,Gpsbps,["$PSRF103,00,00,01,01*25",13,10]  'set ON GGA
    GOTO CHECK_GGA:
    GPGGA:   'start the next step....
    Roger

  2. #2
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default

    Are your saying that timeout will not work if the expected character string OR any signal is received whithin the timeout value? I'm confused.
    Yes, that is why TIMEOUT does not work with RF serial comms either. There is always noise that will appear to be a signal.
    Here is a snippet from a GPS app of mine if it helps.
    Code:
    SERIN2 PORTB.2,16572,[WAIT("$GPGGA"),WAIT(","),DEC2 H,DEC2 M,DEC2 S,_
            WAIT(","),DEC2 ND,DEC2 NM,WAIT("."),DEC3 NMD,WAIT(",N,"),_
            DEC3 WD,DEC2 WM,WAIT("."),DEC3 WMD]
    Dave
    Always wear safety glasses while programming.

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