HSERIN WAIT parameter


Closed Thread
Results 1 to 3 of 3
  1. #1
    Join Date
    Sep 2007
    Posts
    11

    Default HSERIN WAIT parameter

    Hi,

    Is it possible for WAIT command in HSerin to wait for either for the string "OK" or "ERROR"?

    What I want to happen is that, if Either of the String "Ok" or "Error" is received the HSERIN will start to put received buffer to variable.

    Thanks

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


    Did you find this post helpful? Yes | No

    Default

    You can not WAIT for both at the same time.

    Depending on you application...
    Wait for one and if not received, use the TIMEOUT option to goto a wait for the other.
    Or...
    Take all data all the time into an array, then check the array for "OK" or "ERROR". Then process from there.
    Dave
    Always wear safety glasses while programming.

  3. #3
    Join Date
    Sep 2007
    Posts
    11


    Did you find this post helpful? Yes | No

    Default

    thank you.

    hserin 1000, _WaitTimeOut, [str rbuffer\5\13]
    endif

    lookdown2 rbuffer, ["OK",$FF,$FF,$FF ,"ERROR","+CMTI","+CMGR"], b0
    b0=b0/5

Similar Threads

  1. Can't read sequential addresses in external EEPROM
    By tjkelly in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 18th February 2010, 14:46
  2. HARDWARE I2C SAMPLE CODE question
    By Michael Wakileh in forum Code Examples
    Replies: 2
    Last Post: - 16th June 2009, 21:07
  3. PIC HSERIN problem
    By shaiqbashir in forum mel PIC BASIC Pro
    Replies: 10
    Last Post: - 20th July 2008, 11:08
  4. 16F877a Interupt driven Hserin
    By RFsolution in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 3rd November 2006, 00:38
  5. Hserin
    By egberttheone in forum mel PIC BASIC Pro
    Replies: 6
    Last Post: - 27th November 2004, 15:42

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