Processor Expert and Serial I2C EEPROMs

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

Processor Expert and Serial I2C EEPROMs

1,496件の閲覧回数
richardfox75
Contributor III

When using the Processor Expert component, I2C_LDD, to access a serial EEPROM, how,is the

device address specified? I am using an ST 24C16 chip. The device select code is the standard

0xA0, plus the 3 MSB address bits. The Processor Expert methods such as SelectSlaveDevice

require the device address as a parameter, But the generated code checks for an address

greater than 127 and flags an error if found.

The 24C16 uses the 3 MSB address bits as a 2K block select. The memory address is the offset

within the 2K block. How is the device address specified to get the 0xA0 sent on the I2C bus?

0 件の賞賛
返信
3 返答(返信)

1,255件の閲覧回数
BlackNight
NXP Employee
NXP Employee

Hi Richard,

I do have an example (plus a Processor Expert component) for the 24A series of EEPROMS, see https://mcuoneclipse.com/2013/08/18/driver-for-microchip-24xx-serial-eeprom/ .

I think your ST chip is compatible with the Micrchip one. That component supports multiple different devices, including the '16' one:

pastedImage_1.png

I hope this helps,

Erich

0 件の賞賛
返信

1,255件の閲覧回数
richardfox75
Contributor III

Erich,

Thanks for the e-mail response. I used your 24xx component. The code works

correctly.

Dick Fox

Firmware Engineer

NATIONAL CONTROLS CORPORATION BUSINESS UNIT

INSTRUMENTATION AND SPECIALTY CONTROLS DIVISION

1725 Western Dr | West Chicago, IL 60185 | http://www.ametekncc.com

Phone: (630)621-3118 | email: Dick Fox@ametek.com

0 件の賞賛
返信

1,255件の閲覧回数
kerryzhou
NXP TechSupport
NXP TechSupport

Hi Richard,

    From the 24C16 datasheet, we can know that, the device select code is like following:

9.jpg

10.jpg

  So, you can configure the device code+memory MSB addresses as the PE I2C target slave address, then write the I2C code, follow the Byte ADDR in the code, this Byte code, you don't need to add in the PE I2C address configurations.

Wish it helps you!

If you still have question, please contact me!

Have a great day,
Jingjing

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 件の賞賛
返信