(about c12 register of MPL115A1)How to caculate register c12 when use MPL115A1?

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

(about c12 register of MPL115A1)How to caculate register c12 when use MPL115A1?

870件の閲覧回数
yuqingbo
Contributor I

  Depend on the datasheet , when c12 = 38CCh, how to change c12 to 0.00086665??

タグ(1)
0 件の賞賛
返信
1 返信

771件の閲覧回数
TomasVaverka
NXP TechSupport
NXP TechSupport

Hi Yu,

I have to admit that computation of some coefficients might be a bit unclear.

First, it is necessary to take into account how the coefficients are stored in registers 0x04 – 0x0B and that are coded in 2’s complement notation.

As for the c12 coefficient, the last two bits of the c12 LSB are zero as shown on page 7 of the MPL115A1 datasheet:

 

c12 MSB byte = c12[13:6] = [b13 , b12 , b11 , b10 , b9 , b8 , b7 , b6]

c12 LSB byte = c12[5:0] & “00” = [b5 , b4 , b3 , b2 , b1 , b0 , 0 , 0]

... and the c12 coefficient is formatted as follows:

 

c12 = b13 . 000 000 000 b12 b11 b10 b9 b8 b7 b6 b5 b4 b3 b2 b1 b0

Considering our example, the 16-bit c12 = 0x38CC.

 

Then b12 .. b0 = 0b011 1000 1100 11 = 3635

 

and c12 = 3635 / 2^22 = 0.00086665

I hope it makes sense.

Best regards,

Tomas

0 件の賞賛
返信