Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

How can I implement the parity check on uart ?

Status
Not open for further replies.

ikki

Junior Member level 1
Joined
Nov 2, 2008
Messages
15
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,283
Activity points
1,455
how can I implement the parity check on uart ?

i do know i can set to even or odd mode ... but where can I insert it ? how do i check number of even '1' and odd '1' ?

any vhdl code for parity check ?
 

parity check uart

**broken link removed**

The magic of xor. Scroll down to parity check.
 

checking odd parity with xor

During transmission : Compute the XOR of all bits of the word to be transmitted. The value computed indicates if the number of '1' is even (takes the value '0') or odd (takes the value '1'). If you want to have even/odd parity, take the XOR of the above value with '0'/'1' respectively. The final bit computed can be transmitted as the parity bit of the uart word.

During reception : Do the same as above and compare the bit calculated with the parity bit received from the RX line. If they differ, then you have detected an error in the transmission. If they are equal, then this means either that no error occurred or that an even amount of bits have been flipped.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top