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 support@ccsinfo.com

24CW128X HAR question

 
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

24CW128X HAR question
PostPosted: Fri Jul 31, 2020 9:59 pm     Reply with quote

I decide to use a small SOT23-5 eeprom. The Microchip part number is:
24CW1280T-I/OT

Other than the HAR register the timing seems to be about the same as more conventional 24LC256 versions.

The big difference is the Hardware Address register which allows setting the Device Address A2,A1,A0 bits by writing to the HAR register so that up to 8 devices can be on the same bus.

Reading the datasheet I concluded the base address 0XA0 is a valid address and proceeded to use some CCS example code to read and write data.

The first attempt does not work, Read just returns 0XFF.

I coded PCM Programmer's I2C bus scan code and it returns Address 0XA0 so all appears to be correct with regards to the basic I2C on this hardware.

I'm using CCS I2C software library, which is also working well on the same hardware for a different device at a different address.

I have 3K3 pull up resistors on the SDA and SCL as I said it's working OK on a different part same hardware.

My questions are:
1) Is it a requirement that the HAR register MUST be written to at least once even when using the default Device Address of 0XA0 ?

2) Has anyone used the 24CW series eeprom and is there anything special about it ?

Thanks in advance for any help.
Ttelmah



Joined: 11 Mar 2010
Posts: 19222

View user's profile Send private message

PostPosted: Sat Aug 01, 2020 1:59 am     Reply with quote

Which example driver are you using?.
Are you pausing after power up?. The chip needs you to wait for at least
Tpup after power is applied before it can work (100uSec).
soonc



Joined: 03 Dec 2013
Posts: 215

View user's profile Send private message

PostPosted: Sat Aug 01, 2020 6:52 am     Reply with quote

Ttelmah wrote:
Which example driver are you using?.
Are you pausing after power up?. The chip needs you to wait for at least
Tpup after power is applied before it can work (100uSec).


Good point about the power up delay, but that was not the issue in this case.

I revisited the Drivers and found 24128.c . I dumped the init_ext_eeprom() which is not required for what I'm doing.

I also changed the delay_ms(10) at the end of write_ext_eeprom() to 5mS.

I can confirm writing to the HAR is NOT needed if the address for the chip is used.

Anyone using this for the first time should note the base address varies and is in the part number. See data sheet. PCM Programmer's I2C scan code finds it just fine.

Thanks for the help.
Ttelmah



Joined: 11 Mar 2010
Posts: 19222

View user's profile Send private message

PostPosted: Sat Aug 01, 2020 8:31 am     Reply with quote

Well done.
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