AnsweredAssumed Answered

P. Expert I2C Bean problem.

Question asked by Eduardo Oscar Camardelli on Apr 28, 2010
Latest reply on Aug 6, 2012 by David Veerman

Hello everybody,

 

JM60 I2C module connected to TMP100 I2C Temperature sensor.

Problem is that process   EI2C1_RecvBlock(data,2,Rcv);     disable my Port A when is  excecuted.

All other comunication process with TMP100 temperature sensor work perfectly.

Part of code:

 

int  Read_Temp (){
  
   int Tph,Tpl;
   error=EI2C1_SelectSlave(0x48);           
   Pointer=0x00;
   error=EI2C1_SendChar(Pointer);            
   error=EI2C1_RecvBlock(data,2,Rcv);     // Here disable Port A (in *Rcv0=:smileywink:                                                  

   Temph=*data;                             
   Templ=*(data+1);                             
   Tph=(int)Temph;
   Tpl=(int)Templ;
   Tph <<= 4;
   Tpl >>= 4;
   Temp=Tph|Tpl;
  
   PTADD=0x18;                              //Enable PTAD because
   PTAD=0x18;                               // RecvBlock disable  this
   return (Temp);
 }

 

Thank you very much for suggestions.

Best Regards

Eduardo.

Outcomes