Solved

Parity handling in DCB

Posted on 1998-02-06
9
736 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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

zlib is a free compression library (a DLL) on which the popular gzip utility is built.  In this article, we'll see how to use the zlib functions to compress and decompress data in memory; that is, without needing to use a temporary file.  We'll be c…
As more and more people are shifting to the latest .Net frameworks, the windows presentation framework is gaining importance by the day. Many people are now turning to WPF controls to provide a rich user experience. I have been using WPF controls fo…
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…
I designed this idea while studying technology in the classroom.  This is a semester long project.  Students are asked to take photographs on a specific topic which they find meaningful, it can be a place or situation such as travel or homelessness.…

948 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

22 Experts available now in Live!

Get 1:1 Help Now