RXD1
 
Syntax

FUNCTION RXD1 as INTEGER
Description -- added in Version 7.13


RXD1 will receive a single byte of data that is shifted as an asynchronous serial stream. 

RXD1 will return 0-255 if there was data present. or -1 ($FFFFFFFF) if there is no serial stream available.  The hardware UART is used, so the CPU is not tied up, and bytes are buffered up to 256 bytes being received by an interrupt routine. 

ARMmite--

Pin labeled IO0 on the schematic, UART1 of the LPC2103.

ARMexpress LITE

Pins labeled IO5

Data is positive true.  Baudrates can be upto 115.2 Kbaud.

Example

BAUD1 = 19200                    ' set baud rate and enable channel 
... 

' Wait for serial input on pin UART1
DO
    MyByte = RXD1
UNTIL MyByte >= 0
 

Differences from other BASICs

See also