PEx I2C Target Slave Address Init Error ?

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

PEx I2C Target Slave Address Init Error ?

跳至解决方案
1,511 次查看
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,266 次查看
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,267 次查看
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,266 次查看
Designer11
Contributor IV

Hi Jorge,

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

Thanks,

Vu 

0 项奖励
回复