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 ?
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.
解決済! 解決策の投稿を見る。
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:
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
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:
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
Hi Jorge,
Thanks! Your answer makes sense. I got it now.
Thanks,
Vu