Description
Parse word as an unsigned decimal integer fitting dataBits plus any parity bit.
UART frames combine a start bit, data, optional parity, and stop duration. Baud rate and framing choices jointly determine time and overhead, while polarity and parity correctness are separate checks.
Parse word as an unsigned decimal integer fitting dataBits plus any parity bit.
When to use this tool
Use Microcontroller: Uart Parity Word Data Mask when you need one UART timing, framing, or field calculation.
How to use the tool and how it works
- Enter word, dataBits, parityPresent. Use the units and conventions below.
- Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
- Read result. Expand result to inspect the returned fields.
Parse word as an unsigned decimal integer fitting dataBits plus any parity bit. Mask the low 5-9 data bits; return the next bit when parityPresent, otherwise parityBit -1.1
| Input field | Meaning and units | Accepted input |
|---|---|---|
| word | Word | Required. Text. Implementation limit: 8192 Unicode code points and 16384 UTF-16 code units. |
| dataBits | Data Bits | Required. Safe integer. |
| parityPresent | Parity Present | Required. Boolean. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| result | Result | Required. Object. |
| result.dataWord | Data Word | Calculated result member: string. |
| result.parityBit | Extracted parity bit, or -1 when parity is absent. | Calculated result member: number. |
{
"input": {
"word": "257",
"dataBits": 8,
"parityPresent": true
},
"output": {
"result": {
"dataWord": "1",
"parityBit": 1
}
}
} Limitations and assumptions
- The absent-parity -1 is a sentinel; parity correctness and serial bit ordering are not evaluated.
- Outputs are nested inside result. Inputs must satisfy both the field types and the cross-field conditions above. Invalid input causes an error; a successful false flag or documented placeholder is a different result.
- Numeric calculations use binary floating point unless exact decimal-integer arithmetic is explicitly stated. No hidden measurement tolerance or decimal rounding is added; nonfinite or out-of-contract results are rejected. Numeric signed-zero results are exported as zero.
Alternative or Complementary methods
Confirm the device's supported frame format and clock budget, then inspect a measured serial waveform where needed.
References
Similar or alternative tools
- Uart Parity Frame Bit Contribution
Add one start bit, dataBits, optional parity, and stopBits in {1, 1.5, 2} for frameBits.
- Microcontroller: Register Write Clear Effect
Parse current, writtenOnes, and clearableMask as width-bounded unsigned decimal integers.