Does the SC18IM704 UART-I2C bridge allow reading and writing to specific target device addresses?

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

Does the SC18IM704 UART-I2C bridge allow reading and writing to specific target device addresses?

跳至解决方案
2,399 次查看
orbeet1973
Contributor II

Hi,

I would like to read a specific register from my target device but no where in the SC18IM704 data sheet does it mention reading or writing from target device registers.  There are only 4 types of read/write commands specified (pages 4-6) and as far as I can tell they only allow me to read/write a quantity of bytes but there is no mention of reading/writing to a specific address within that target device.

 

To clarify my question, I want to read register 0x92 on target device (address 0111001) and conversely I would like to read several locations within that device.

 

Any help on this will be greatly appreciated.

Oscar

0 项奖励
回复
1 解答
2,360 次查看
orbeet1973
Contributor II

Hi Tomas,

I have tested my circuit and it works great.

Thank you for your support.

Oscar

在原帖中查看解决方案

0 项奖励
回复
4 回复数
2,367 次查看
orbeet1973
Contributor II

Hi Tomas,

Thank you for taking the time to explain the syntax usage.  I was thrown off because I didn't recognize that DATA 0 actually could be used for the register address.  I will test this out shortly.

Much appreciated!

Oscar

0 项奖励
回复
2,371 次查看
TomasVaverka
NXP TechSupport
NXP TechSupport

Hi Oscar,

The SC18IM704 does allow to write to target device register.

Look at the example in the UM11664 (page 7):

Capture.JPG

So the register address actually corresponds to DATA 0 in Figure 3:

Fig. 3.JPG

As for reading from a specific register, you need first to specify the register address:

Capture 1.JPG

Then you need to specify the number of bytes to be read starting from this address:

Capture 2.JPG

I hope it makes sense. 

Just to add that the 7-bit slave address of the EEPROM used on the EVB is 0x50 which translates to 0xA0 for a write and 0xA1 for a read used in these examples.

Best regards,

Tomas

0 项奖励
回复
2,361 次查看
orbeet1973
Contributor II

Hi Tomas,

I have tested my circuit and it works great.

Thank you for your support.

Oscar

0 项奖励
回复
2,351 次查看
TomasVaverka
NXP TechSupport
NXP TechSupport

Hi Oscar,

Thanks for your feedback, glad to hear it works flawlessly.

Best regards,

Tomas

0 项奖励
回复