cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
mspalpsahan
Adventurer
Adventurer
527 Views
Registered: ‎10-13-2018

i2c address

Jump to solution

I am using the AXI IIC ip Blog. When I do the slave address 0x2c, it stays in the loop while writing on the i2c bus address. As shown in the picture 1, but when I do the slave address is 0x58, the i2C bus works as shown in the picture 2.
Why does the slave not work when I do the address 0x2c?

 

Best regards

Alpaslan Sahan

20201224_203029.jpg20201224_203458.jpg

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Picture 1                                                                                  Picture 2

0 Kudos
1 Solution

Accepted Solutions
mspalpsahan
Adventurer
Adventurer
456 Views
Registered: ‎10-13-2018

thank you very much

 

Alpaslan Sahan

View solution in original post

0 Kudos
3 Replies
derekm_
Voyager
Voyager
499 Views
Registered: ‎01-16-2019

I don't know anything about the IIC blog, but clearly the slave in your system is set to respond to address 0x58. I2C slaves can only ever respond to one address. (Devices usually have some method to set the address, but once your system is up and running, it can't be changed). Why do you expect the slave to respond to 0x2C? What slave have you connected to your system?

mspalpsahan
Adventurer
Adventurer
457 Views
Registered: ‎10-13-2018

thank you very much

 

Alpaslan Sahan

View solution in original post

0 Kudos
timrprobocom
Visitor
Visitor
343 Views
Registered: ‎12-23-2020

An I2C device has a 7-bit address, but on the bus each device has two addresses: one for read, one for write.  To get the value you need to write on the bus, you shift the address left by one, and add 1 if it is a read.  So, if a device's documentation says it has slave address 0x2C, the address you'd put on the bus is 0x58 for write, 0x59 for read.

0 Kudos