PI1X Basic Programming Manual Ver. 1.10
106/156
3.19
USB commands
Purpose
:
To initialize and enable USB port.
Syntax
:
USB_OPEN
Example
:
USB_OPEN
Description
:
Using USB_OPEN command can initialize and enable the
USB port.
Purpose
:
To close the USB port.
Syntax
:
USB_CLOSE
Example
:
USB_CLOSE
Description
:
Using USB_CLOSE command can disable and suspend the
USB port.
Purpose
:
To read specific number of bytes from USB port.
Syntax
:
A$=USB_READ$(N%)
Example
:
KEY$=USB_READ$(1)
Description
:
A$
is a string variable to be assigned to the data.
N%
is an integer variable indicating number of bytes to be
read from USB port.
Purpose
:
To write specific number of bytes to the PC side.
Syntax
:
USB_WRITE(A$ , N%)
Example
:
USB_WRITE(A$,100)
Description
:
A$
is a string variable indicating the data is to be sent.
N%
is an integer variable indicating number of bytes to be
writen to USB port.