zulander Guest
|
i2c and ds75 help |
Posted: Wed Nov 29, 2006 10:14 am |
|
|
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);
} |
|