Adds a new command called GetParity
Syntax
Assignment Variable = GetParity (Variable)
Overview
Returns the parity of the Variable. 1 if parity is odd and 0 if parity is even.
Operators
Assignment Variable – A byte variable. Variable - a byte sized constant, or variable
Code:
Include "PROTON_4.INC"
Dim ParityResult As Byte
Dim OutByte As Byte
Symbol TX9D = TXSTA.0 ' 9th bit of transmit data. Can be parity bit.
Symbol TX9 = TXSTA.6 ' 9-bit Transmit Enable
TX9 = 1 ' Enable 9 bit data
OutByte = 255
ParityResult = GetParity OutByte
TX9D = ParityResult ' Load the 9th (parity) bit
HRSOut OutByte
Stop
Download module
Download: Usart Tools Get Parity 

Menu
Recent Articles


Using PDS with SPI GLCD based on ST7565R Controller
Graphic LCDs based on the ST7565 are cheaper then GLCDs with other controllers. SPI requires only four pins. If the circuit