Hi,
Iam trying to communicate with DS1621 for a while now but the problem is I am not getting the proper temperature values.The output is always equal to FF.Iam getting proper acknowledgement for every command sent to DS1621.
Please help me with this problem..Thank you in Advance..
//**************************** TRANSMIT ***************************
void i2c_transmit(unsigned char b)
{
IDLEI2C();
SSPBUF=b; //WRITE TO BUFFER
while(SSPIF!=1); //WAIT UNTIL ALL NINE BITS ARE SENT
SSPIF=0;
WCOL=0; //CLEARING THE WCOL TO AVOID BUSY FLAG SET
while(ACKSTAT!=0); //ACK ON 9TH CLOCK PULSE
ACKSTAT=1;
}
//************************ configuration for temperature control ******************************
void i2c_config()
{
unsigned int t,i;
i2c_start();
i2c_transmit(I2C_WRITE);
i2c_transmit(0xac); //acess configuration command
i2c_transmit(0x00); //continous conversion command
delay_ms(20); //delay of more than 20msec for data write.
DS1621 I2C communication with C8051F120
Hi,
Am using DS1621 to communicate with C8051F120 via I2c...Could someone help me regaring the command set of DS1621.? Am unable to figure out how to use the command set..(Read Temperature [AAh], Access TH [A1h] ..e.t.c).
Am new to this, if someone has worked on this command set of DS1621..Please help.. Am leftout with very less time to complete this...
Thanks,
EH
DS1621 I2C communication with C8051F120
Hi,
Am using DS1621 to communicate with C8051F120 via I2c...Could someone help me regaring the command set of DS1621.? Am unable to figure out how to use the command set..(Read Temperature [AAh], Access TH [A1h] ..e.t.c).
Am new to this, if someone has worked on this command set of DS1621..Please help.. Am leftout with very less time to complete this...
Thanks,
EH