PEx I2C Target Slave Address Init Error ?

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

PEx I2C Target Slave Address Init Error ?

ソリューションへジャンプ
1,506件の閲覧回数
Designer11
Contributor IV

Hi Everyone,

When using Processor Expert to assign an I2C slave address, 0xA0 it keeps saying "This value is greater 127, although 7-bit addressing is used". In the past, i never had this issue when i bit bang the I2C. Is this a bug in Processor Expert ?  

pastedImage_1.png

The processor i'm using is K64F. Will i face the same I2C issue if i use the KDSK ?

The slave address is 0xA0

Thanks.

0 件の賞賛
返信
1 解決策
1,261件の閲覧回数
Jorge_Gonzalez
NXP Employee
NXP Employee

Hello Vu Nguyen,

This is not a bug. 0xA0 is an 8-bit value (10100000b), so not valid for a 7-bit slave address. As noted by PE the max address would be 127 (1111111b).

I believe you are taking the R/W bit as part of the address. See the 7-bit slave addressing scheme below:

pastedImage_1.png

If that is the case then take only the 7 most significant bits to form the slave address. For 0xA0 (10100000b) the actual slave address would be 0x50 (1010000b).

Best Regards!

Jorge Gonzalez

元の投稿で解決策を見る

0 件の賞賛
返信
2 返答(返信)
1,262件の閲覧回数
Jorge_Gonzalez
NXP Employee
NXP Employee

Hello Vu Nguyen,

This is not a bug. 0xA0 is an 8-bit value (10100000b), so not valid for a 7-bit slave address. As noted by PE the max address would be 127 (1111111b).

I believe you are taking the R/W bit as part of the address. See the 7-bit slave addressing scheme below:

pastedImage_1.png

If that is the case then take only the 7 most significant bits to form the slave address. For 0xA0 (10100000b) the actual slave address would be 0x50 (1010000b).

Best Regards!

Jorge Gonzalez

0 件の賞賛
返信
1,261件の閲覧回数
Designer11
Contributor IV

Hi Jorge,

Thanks! Your answer makes sense. I got it  now.

Thanks,

Vu 

0 件の賞賛
返信