Positron Compiler Documentation

USART3 Declares for use with Hrsin3, Hserin3, Hrsout3 and Hserout3.

Source: Positron16 Compiler User Manual, PDF page 417

Declare HRsout3_Pin Port.Pin Declares the port and pin used for USART3 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 HRsin3_Pin Port.Pin Declares the port and pin used for USART3 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 Hserial3_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 Hserial3_Parity Odd or Even Enables/Disables parity on the serial port. For Hrsout3, Hrsin3, Hserout3 and Hserin3. 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 Hserial3_Parity declare.

Declare Hserial3_Parity = Even  ' Use if even parity desired
Declare Hserial3_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 Hrsout3_Pace 0 to 65535 microseconds (us) Implements a delay between characters transmitted by the Hrsout3 or HSerout3 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 Hrsout3 or HSerout3.

If the Declare is not used in the program, then the default is no delay between characters.