CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

Reading FRAM Device ID info

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
soonc



Joined: 03 Dec 2013
Posts: 215

View user's profile Send private message

Reading FRAM Device ID info
PostPosted: Thu May 15, 2014 8:56 pm     Reply with quote

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

View user's profile Send private message

PostPosted: Thu May 15, 2014 9:24 pm     Reply with quote

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

View user's profile Send private message

PostPosted: Fri May 16, 2014 5:30 am     Reply with quote

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.
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group