Solved

Parity handling in DCB

Posted on 1998-02-06
9
740 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

 

Author Comment

by:ajay_bhasker
ID: 1410974
Dear jhance,
        Thanks for your help.
Ajay
0
 

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

Secure Your Active Directory - April 20, 2017

Active Directory plays a critical role in your company’s IT infrastructure and keeping it secure in today’s hacker-infested world is a must.
Microsoft published 300+ pages of guidance, but who has the time, money, and resources to implement? Register now to find an easier way.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Vb.Net Loading Word 11 107
MSDN Subscription - Azure and NFP's 3 80
SSIS 2010 Convert to SSIS 2013 On Different Box 3 63
Problem to file 3 92
This tutorial is about how to put some of your C++ program's functionality into a standard DLL, and how to make working with the EXE and the DLL simple and seamless.   We'll be using Microsoft Visual Studio 2008 and we will cut out the noise; that i…
This article shows how to make a Windows 7 gadget that accepts files dropped from the Windows Explorer.  It also illustrates how to give your gadget a non-rectangular shape and how to add some nifty visual effects to text displayed in a your gadget.…
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…
Are you ready to implement Active Directory best practices without reading 300+ pages? You're in luck. In this webinar hosted by Skyport Systems, you gain insight into Microsoft's latest comprehensive guide, with tips on the best and easiest way…

749 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