How to communicate with Even Parity device?

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to communicate with Even Parity device?

Jump to solution
970 Views
everkimage
Contributor IV

My mcu is MC9S12XEP.I use it's serial communication interface to communicate with other device which is EVEN Parity 485 Bus.It doesn't work now.But i can use PC software(Even Parity) to communicate with that device.

In the RM file : SCICR1.PE = 1 enable the parity function and insert a parity bit in the most significiant bit position.And i get the result in PC software like this:

0x01 change to 0x81

0x85 change to 0x05

Normally Even Parity will insert a parity bit at the end of data.

What can i do to communicate with Even Parity communication device using MC9S12XEP?

Labels (1)
0 Kudos
Reply
1 Solution
906 Views
kef2
Senior Contributor V

Hi,

  • SCICR1.PE = 1 enable the parity function and insert a parity bit in the most significiant bit position
  • Normally Even Parity will insert a parity bit at the end of data.

SCI is LSB first. So most significant bit position is at the end of data.

Even or odd parity is set up using PT bit.

BTW you didn't say how many bits is your data format, 8 or 9. If your S12XE is set up for 8bits, it would mean then 8bits including parity bit. Don't you need 8bits plus parity bit  = 9 bits? Please check 20.4.3 Data Format.

Edward

View solution in original post

0 Kudos
Reply
1 Reply
907 Views
kef2
Senior Contributor V

Hi,

  • SCICR1.PE = 1 enable the parity function and insert a parity bit in the most significiant bit position
  • Normally Even Parity will insert a parity bit at the end of data.

SCI is LSB first. So most significant bit position is at the end of data.

Even or odd parity is set up using PT bit.

BTW you didn't say how many bits is your data format, 8 or 9. If your S12XE is set up for 8bits, it would mean then 8bits including parity bit. Don't you need 8bits plus parity bit  = 9 bits? Please check 20.4.3 Data Format.

Edward

0 Kudos
Reply