Waiting for data input

Function

Suspend the user application program, waiting for data.

Syntax

Detailed Description

This particular WAIT statement waits for port 0 bit 3 to go to 1, indicating that there is data in the receive buffer. Specifying other bits as well terminates the wait, for example, on key input or when the specified timeout interval has elapsed.

Examples

Wait for data input
  open "COM1:115200" as #1
  wait 0,&h08
Wait for data input or key press
  open "COM1:115200" as #1
  wait 0,&h09
Wait for data input, key press, or timeout (3 seconds)
  open "COM1:115200" as #1
  timea = 30                 ' set timeout interval to 3 seconds
  wait 0,&h19

(C)2002-2004 DENSO WAVE INCORPORATED All right reserved