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

i2c and ds75 help

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







i2c and ds75 help
PostPosted: Wed Nov 29, 2006 10:14 am     Reply with quote

Hi guys, I am having a problem with reading a temperature Sensor (ds75) the pin A0,A1,A2 are all set to HIGH, which makes the address to 10011110 = 0x9E, this is my I2c code but it’s hanging on the both part ether I initialize or I try to read it


static void int_ds75()
{
i2c_start ();
i2c_write (0x9E);
i2c_write (0x00); //move to temperature pointer
i2c_stop ();
}

static void read1_ds75(){
int msb,lsb;
i2c_start();
i2c_write(0x9F);
msb = i2c_read(); /
lsb = i2c_read(0);
i2c_stop();

printf("******************%x,%x",msb,lsb);
}
Zulander
Guest







problem solved
PostPosted: Wed Nov 29, 2006 11:22 am     Reply with quote

I have solved the problem...

Thank you it was a problem with the circuit
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