View Full Version : Change Parity in serial comunication
scrwld
- 7th June 2010, 07:59
hello.
I have a communication program using interrupt (no use hserin, hserout1, ect.), communication parameters is 8N1. work ok.
I need to change the parity to Even or odd.
1 .- is it possible?
2 .- how do that?
I have read all post but I get no information about this,
regards
luis lopez
mackrackit
- 7th June 2010, 09:08
Take a look at the manual. It explains how to do it better than I can.
scrwld
- 14th June 2010, 20:48
thanks for your response. I have read the manual but there is no reference to what I do, instruction or DEFINE DEFINE HSER_EVEN HSER_ODD affect HSERIN, HSEROUT, I do not use these instructions.
I thought that if I make the following I can use another type of parity:
1 .- TXTSTA Registry abilità bit TX9,
2 .- To determine the parity of the character.
3 .- I keep the result in the register TX9D
4 .- I save the data to send in the registration TXREG.
5 .- transfer the information.
for the reception:
1. I read the record RX9D
2 .- log read RXREG
3 .- parity calculation
4 .- compared with the value of RX9D.
5 .- take action.
do you think, is that correct?
mackrackit
- 15th June 2010, 09:33
What you have might work but I am not sure, I have not tried it.
This is one of those places where PBP is really worth the money, it makes this easy.
So I would suggest using the PBP DEFINES and HSERIN/OUT.
Sorry I can not help more.
Powered by vBulletin® Version 4.1.7 Copyright © 2025 vBulletin Solutions, Inc. All rights reserved.