View previous topic :: View next topic |
Author |
Message |
soonc
Joined: 03 Dec 2013 Posts: 215
|
Reading FRAM Device ID info |
Posted: Thu May 15, 2014 8:56 pm |
|
|
Using the Cypress Semi FM24V10 FRAM and I'm a little confused as to how to read the device ID.
The data sheet describes how to read it, step 2 mentions the slave address, and I assume it refers to how the A0,A1,A2 pins are wired.
My hardware has: A0=0, A1=Vdd, A2=0 so I assume the address is 0X02.
The lower two bits are don't care so I assume the address is shifted left by 2 to become 0X08 .
The rest of the "How To" seems fairly straight forward but I'm not getting the result I expected.
Code: |
i2c_start();
i2c_write(0XF8);
i2c_write(0X08);
i2c_start();
i2c_write(0XF9);
data = i2c_read(1);
data1 = i2c_read(1);
data2 = i2c_read(0);
i2c_stop();
|
Has anyone been able to get the ID info. ?
I should mention other code used to read and write actual data locations works just fine. So I presume the I2C is doing it's job.
Thanks. |
|
|
jeremiah
Joined: 20 Jul 2010 Posts: 1355
|
|
Posted: Thu May 15, 2014 9:24 pm |
|
|
The top right corner of Page 6 of the data sheet shows how to format the address byte. You definitely don't have the correct address format. It shows the first 4 bits being 1010, which is A in hex, not 0. You'll find that external memory slave addresses commonly all start with A. Also, there is no A0 listed on the pin diagram.
Are you sure you have the right part number listed? I'm looking at the data sheet for the Cypress Semi FM24V10 FRAM, but it doesn't match some of your description.
http://www.cypress.com/?docID=48138
is what I found. |
|
|
soonc
Joined: 03 Dec 2013 Posts: 215
|
|
Posted: Fri May 16, 2014 5:30 am |
|
|
jeremiah wrote: | The top right corner of Page 6 of the data sheet shows how to format the address byte. You definitely don't have the correct address format. It shows the first 4 bits being 1010, which is A in hex, not 0. You'll find that external memory slave addresses commonly all start with A. Also, there is no A0 listed on the pin diagram.
http://www.cypress.com/?docID=48138
|
Thanks I missed that on page 6, that fixed it. Also the A0 pin came from the old schematic because the FRAM is replacing a EEPROM that has all 3 address pins. I used Slave address 0XA4 data returned is 0X00 0X40 0X00
which is correct for parts with no ESN.
Thanks again. |
|
|
|