Instructions
324Libraries
© 2013 Conrad Electronic
Description
Reads one byte from the serial interface. In opposite to Serial_Read() Serial_ReadExt() returns immedi-
ately even if there is no byte available in the serial port. In this case 256 (100 Hex) is returned.
Please use Serial_ReadExt() if you work in serial IRQ mode. Serial_Read() only supports polled
mode.
Parameter
serport interface number (0 = 1st serial port, 1 = 2nd serial port )
Return Parameter
received byte from the serial interface
256 (100 Hex) if there was no byte available
5.20.10 Serial_Write
Serial Functions Example
Syntax
void Serial_Write(byte serport, byte val);
Sub Serial_Write(serport As Byte, val As Byte)
Description
One byte is send to the serial interface.
Parameter
serport interface number (0 = 1st serial port, 1 = 2nd serial port )
val output byte value
5.20.11 Serial_WriteText
Serial Functions
Syntax
void Serial_WriteText(byte serport, char text[]);
Sub Serial_WriteText(serport As Byte, ByRef Text As Char)
Description
All characters of the char array up to the terminating zero are send to the serial interface.