?
Solved

Parity handling in DCB

Posted on 1998-02-06
9
Medium Priority
?
748 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 200 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
Veeam Task Manager for Hyper-V

Task Manager for Hyper-V provides critical information that allows you to monitor Hyper-V performance by displaying real-time views of CPU and memory at the individual VM-level, so you can quickly identify which VMs are using host resources.

 

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

NEW Veeam Agent for Microsoft Windows

Backup and recover physical and cloud-based servers and workstations, as well as endpoint devices that belong to remote users. Avoid downtime and data loss quickly and easily for Windows-based physical or public cloud-based workloads!

Question has a verified solution.

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

After several hours of googling I could not gather any information on this topic. There are several ways of controlling the USB port connected to any storage device. The best example of that is by changing the registry value of "HKEY_LOCAL_MACHINE\S…
Whether you've completed a degree in computer sciences or you're a self-taught programmer, writing your first lines of code in the real world is always a challenge. Here are some of the most common pitfalls for new programmers.
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 video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …

762 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