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

i2c device address?

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



Joined: 01 Dec 2009
Posts: 9
Location: sherman CT

View user's profile Send private message

i2c device address?
PostPosted: Wed Dec 09, 2009 12:28 pm     Reply with quote

I'm trying to talk to a NXP PCF8593 RTC chip.
http://www.nxp.com/documents/data_sheet/PCF8593.pdf
the other "end" is a PIC 16F877A.
From the PCF8593 Data Sheet the slave address is:

1 0 1 0 0 0 1 R/!W (8 bits total)

I do this:
Code:

int1 ack;

output_float(PCF8593_SCL);
output_float(PCF8593_SDA);
//pulse NOTRESET-
output_low(PCF8593_NOTRESET);
output_high(PCF8593_NOTRESET);


i2c_start();           
ack = i2c_write(0x0A);         //???

Is the 0x0A correct? Or should I send some other value such as 0xA2?
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Wed Dec 09, 2009 12:36 pm     Reply with quote

For CCS functions, the i2c write address is 0xA2 and the read address
is 0xA3.

In fact, it says this on the left side of page 3 of the PCF8593 data sheet:
Code:

· Slave address:
– READ A3
– WRITE A2
rret



Joined: 01 Dec 2009
Posts: 9
Location: sherman CT

View user's profile Send private message

thanks
PostPosted: Wed Dec 09, 2009 1:01 pm     Reply with quote

thanks, i really missed that info! Embarassed
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