Change Parity in serial comunication


Closed Thread
Results 1 to 4 of 4
  1. #1
    Join Date
    Jun 2010
    Location
    Venezuela
    Posts
    12

    Default Change Parity in serial comunication

    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

  2. #2
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default

    Take a look at the manual. It explains how to do it better than I can.
    Dave
    Always wear safety glasses while programming.

  3. #3
    Join Date
    Jun 2010
    Location
    Venezuela
    Posts
    12


    Did you find this post helpful? Yes | No

    Default

    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?

  4. #4
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default

    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.
    Dave
    Always wear safety glasses while programming.

Members who have read this thread : 1

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts