timeout of Hserin, goto, gosub or both?


Results 1 to 7 of 7

Threaded View

  1. #4
    Join Date
    May 2008
    Location
    Italy
    Posts
    825


    Did you find this post helpful? Yes | No

    Default

    Difficult to give suggestions without knowing what you have in mind to achieve. The below is a simple way to get out of the While/Wend loop.

    Code:
    StrLIst    var byte[10] ' for example not knowing the true dimension
    gotchar   var byte
    
    
    BUfferChar:
    gotchar=0
    return_code=0
    low HIGH RED_LED
    While return_code<>13 or gotchar >9
      Hserin 50, NoData, [return_code]
      StrLIst[gotchar]=return_code
      gotchar=gotchar+1   
      WEND
    RETURN
    
    
    Nodata:
    HIGH RED_LED   ; Show Error led (use the high state of this pin to workout   the timeout in the main routine)
    Return
    Al.
    Last edited by aratti; - 27th October 2009 at 08:16.
    All progress began with an idea

Similar Threads

  1. Graphic LCD with PICbasic pro
    By amindzo in forum mel PIC BASIC Pro
    Replies: 41
    Last Post: - 25th November 2012, 11:45
  2. Making a menu
    By chrisshortys in forum mel PIC BASIC Pro
    Replies: 36
    Last Post: - 12th November 2008, 19:54
  3. Problems with RC2 and RC3
    By Christopher4187 in forum General
    Replies: 11
    Last Post: - 29th May 2006, 17:19
  4. Output PIC module
    By freelancebee in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 12th September 2005, 20:10
  5. ds1307 from f877 to f452 not work
    By microkam in forum mel PIC BASIC Pro
    Replies: 23
    Last Post: - 7th July 2005, 00:02

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