USART4 Declares for use with Hrsin4, Hserin4, Hrsout4 and Hserout4.
Declare HRsout4_Pin Port.Pin Declares the port and pin used for USART4 transmission (TX). The location of the port and pin is dictated by the device's PPS (Peripheral Pin Select) options. Note that this declare will not alter any PPS (Peripheral Pin Select) SFRs.
There is no default setting for this Declare and it must be used within the BASIC program.
Declare HRsin4_Pin Port.Pin Declares the port and pin used for USART4 reception (RX). The location of the port and pin is dictated by the device's PPS (Peripheral Pin Select) options. Note that this declare will not alter any PPS (Peripheral Pin Select) SFRs.
There is no default setting for this Declare and it must be used within the BASIC program.
Declare Hserial4_Baud Constant value Sets the Baud rate that will be used to transmit or receive a byte serially. The Baud rate is calculated using the Xtal frequency declared in the program. The default Baud rate if the Declare is not included in the program listing is 9600 Baud.
Declare Hserial4_Parity Odd or Even Enables/Disables parity on the serial port. For Hrsout4, Hrsin4, Hserout4 and Hserin4. The default serial data format is 8N1, 8 data bits, no parity bit and 1 stop bit. 7E1 (7 data bits, even parity, 1 stop bit) or 7O1 (7data bits, odd parity, 1 stop bit) may be enabled using the Hserial4_Parity declare.
Declare Hserial4_Parity = Even ' Use if even parity desired
Declare Hserial4_Parity = Odd
' Use if odd parity desired
Declare Hserial3_Clear On or Off Clear the overflow error bit before commencing a read.
Declare Hserial3_Clear = On
Declare Hrsout4_Pace 0 to 65535 microseconds (us) Implements a delay between characters transmitted by the Hrsout4 or HSerout4 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 Hrsout4 or HSerout4.
If the Declare is not used in the program, then the default is no delay between characters.