Solved

Parity handling in DCB

Posted on 1998-02-06
9
737 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
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 

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

ScreenConnect 6.0 Free Trial

At ScreenConnect, partner feedback doesn't fall on deaf ears. We collected partner suggestions off of their virtual wish list and transformed them into one game-changing release: ScreenConnect 6.0. Explore all of the extras and enhancements for yourself!

Question has a verified solution.

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

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.  …
What my article will show is if you ever had to do processing to a listbox without being able to just select all the items in it. My software Visual Studio 2008 crystal report v11 My issue was I wanted to add crystal report to a form and show…
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…
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…

770 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