Solved

Parity handling in DCB

Posted on 1998-02-06
9
735 Views
Last Modified: 2013-12-03
I want to know what is meant by MARKPARITY and NOPARITY in DCB while you are sending and receiving the data.    Does fParity = FALSE    means that parity bit won't be included.
0
Comment
Question by:ajay_bhasker
  • 5
  • 4
9 Comments
 
LVL 32

Accepted Solution

by:
jhance earned 50 total points
ID: 1410971
The fParity flag is for the received data stream.  It says don't check parity for correctness or set the parity error flag if the parity is wrong.  In other words, IGNORE PARITY.  This flag has no effect on transmitted parity.  For that, use the Parity flag.  This will tell the transmitter what type:

Value Meaning
EVENPARITY Even
MARKPARITY Mark
NOPARITY No parity
ODDPARITY Odd
SPACEPARITY Space

of parity you want sent.
0
 

Author Comment

by:ajay_bhasker
ID: 1410972
Dear jhance,
      Now the meaning of fParity is clear.
      But please tell me clearly what do you mean by mark.
     
     Is it mean that the transmitted parity bit will be 1 always?
     and  no parity means that parity bit won't be present in the transmitted data.(or it will be 0 always.

Thanx
Ajay
     
0
 
LVL 32

Expert Comment

by:jhance
ID: 1410973
Value Meaning
EVENPARITY Even (The parity bit is always EVEN)
MARKPARITY Mark (The parity bit is always 1)
NOPARITY No parity (The parity bit is not sent at all)
ODDPARITY Odd (The parity bit is ODD)
SPACEPARITY Space (The parity bit is ZERO)
0
 

Author Comment

by:ajay_bhasker
ID: 1410974
Dear jhance,
        Thanks for your help.
Ajay
0
How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

 

Author Comment

by:ajay_bhasker
ID: 1410975
if fParity is FALSE then what will happen if receiving data
1.  includes Parity bit
2.  does not include Parity bit

if fParity is TRUE then what will happen if receiving data has
1. includes Parity bit
2. does not include Parity bit

0
 
LVL 32

Expert Comment

by:jhance
ID: 1410976
>if fParity is FALSE then what will happen if receiving data
>1. includes Parity bit

It will be received but not checked. No parity error will be reported

>2. does not include Parity bit  

You will get a framing error because the UART was expecting a parity bit but didn't get one.



>if fParity is TRUE then what will happen if receiving data has
>1. includes Parity bit

It will be checked and the parity error flag set if it is wrong.

>2. does not include Parity bit

You will get a framing error and may get a parity error as well if the parity bit should be 0.
0
 

Author Comment

by:ajay_bhasker
ID: 1410977
It seems from your answer that the parity bit must be present in the receiving data.

How to set the port if the data you are going to receive does not include parity bit?
0
 
LVL 32

Expert Comment

by:jhance
ID: 1410978
If you have set the receiver to expect parity, then if is not present, there must be some kind of error (in this case FRAMING error) since  a bit is expected in that time slot.  To receive data without parity present, set:

BYTE Parity;               // 0-4=no,odd,even,mark,space

in the DCB to 0, or NO PARITY.  This is different from:

DWORD fParity: 1;          // enable parity checking

which is check/don't check parity
0
 

Author Comment

by:ajay_bhasker
ID: 1410979
Thanks jhance
0

Featured Post

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

This article shows a few slightly more advanced techniques for Windows 7 gadget programming, including how to save and restore user settings for your gadget and how to populate the "details" panel that is displayed in the Windows 7 gadget gallery.  …
This article describes how to programmatically preset the "Pages per Sheet" option that's available with most printer drivers.   This setting lets you do "n-Up" printing, where two, four, or more pages are printed on each sheet of paper. If your …
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…

707 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now