help me please


Results 1 to 20 of 20

Thread: help me please

Threaded View

  1. #2
    Join Date
    Jul 2003
    Posts
    2,405


    Did you find this post helpful? Yes | No

    Default

    Goto Loop causes your program to run in a continuous loop.

    This line; HSerin 2000,APRI,[WAIT ("*ELIP:")] will WAIT for 2 seconds,
    then jump to the APRI sub-routine if ASCII chars *ELIP: are not received
    within the timeout period.

    Execution will also "fall-through" to APRI even if these characters "are"
    received - so you have a continuous loop no matter what happens.

    If you prefer to only enter the APRI sub-routine once these characters
    are received, then change the timeout "label" from APRI to Loop.
    Code:
    INIT:
       Pause 2000
    
    LOOP: 
       Pause 500
       HSerout ["AT*EIPS=1,1",13]
       Pause 500
    
       HSerin 2000,LOOP,[WAIT ("*ELIP:")]
    
    APRI: ' Land here only when characters are received.
       High PORTB.4
       Pause 1000
       Low PORTB.4
       Pause 15000
       Goto LOOP
    Or or use a local label something like this;
    Code:
    INIT:
       Pause 2000
    
    LOOP: 
       Pause 500
       HSerout ["AT*EIPS=1,1",13]
       Pause 500
    
    Loop2: ' Loop to here until characters are received
       HSerin 2000,Loop2,[WAIT ("*ELIP:")]
    
    APRI: 
       High PORTB.4
       Pause 1000
       Low PORTB.4
       Pause 15000
       Goto LOOP
    Last edited by Bruce; - 24th May 2005 at 20:28.
    Regards,

    -Bruce
    tech at rentron.com
    http://www.rentron.com

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