How to communicate with Even Parity device?

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

How to communicate with Even Parity device?

ソリューションへジャンプ
950件の閲覧回数
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?

ラベル(1)
0 件の賞賛
返信
1 解決策
886件の閲覧回数
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 件の賞賛
返信
1 返信
887件の閲覧回数
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 件の賞賛
返信