Rsin - Rsout Declares.
Declare Rsout_Pin = Port.Pin Assigns the Port and Pin that will be used to output serial data from the Rsout command. This may be any valid port on the microcontroller.
If the Declare is not used in the program, then the default Port and Pin is PORTB.0.
Declare Rsin_Pin = Port.Pin Assigns the Port and Pin that will be used to input serial data by the Rsin command. This may be any valid port on the microcontroller.
If the Declare is not used in the program, then the default Port and Pin is PORTB.1.
Declare Rsout_Mode = True or Inverted or 1, 0 Sets the serial mode for the data transmitted by Rsout. This may be inverted or true. Alternatively, a value of 1 may be substituted to represent inverted, and 0 for true.
If the Declare is not used in the program, then the default mode is inverted.
Declare Rsin_Mode = True or Inverted or 1, 0 Sets the serial mode for the data received by Rsin. This may be inverted or true. Alternatively, a value of 1 may be substituted to represent inverted, and 0 for true.
If the Declare is not used in the program, then the default mode is inverted.
Declare Serial_Baud = 0 to 65535 bps (Baud) Informs the Rsin and Rsout routines as to what Baud rate to receive and transmit data.
Virtually any Baud rate may be transmitted and received (within reason), but there are standard Bauds, namely: -
300, 600, 1200, 2400, 4800, 9600, and 19200.
When using a 4MHz crystal, the highest Baud rate that is reliably achievable is 9600. However, an increase in the oscillator speed allows higher Baud rates to be achieved, including 38400 Baud.
If the Declare is not used in the program, then the default Baud is 9600.
Declare Rsout_Pace = 0 to 65535 microseconds (us) Implements a delay between characters transmitted by the Rsout command.
On occasion, the characters transmitted serially are in a stream that is too fast for the receiver to catch, this results in missed characters. To alleviate this, a delay may be implemented between each individual character transmitted by Rsout.
If the Declare is not used in the program, then the default is no delay between characters.
Declare Rsin_Timeout = 0 to 65535 milliseconds (ms) Sets the time, in ms, that Rsin will wait for a start bit to occur.
Rsin waits in a tight loop for the presence of a start bit. If no timeout parameter is issued, then it will wait forever.
The Rsin command has the option of jumping out of the loop if no start bit is detected within the time allocated by timeout.
If the Declare is not used in the program, then the default timeout value is 10000ms which is 10 seconds.

