HXD019

Off-topic Or Otherwise...Say/Ask It Here
kaeroul
Newbie Pyro
Posts: 2
Joined: Tue Oct 07, 2014 6:30 am

HXD019

Postby kaeroul » Tue Oct 07, 2014 7:36 am

hELLO guys,

I have HXD019 (IR chip) and I am using an arduino UNO to drive it. Right now, I want to identify which data is significant to be read and how to decode it. Anybody has experienced in doing this project?

Thanks.
KaL

pseudo code:

Code: Select all

void loop() {
 
  while (digitalRead(BUSY) == 1){
 
    readI2C(temp);
   
        }
 
}

unsigned short I2CReadData(byte* pbData){
   byte Data_Bit,ACKSign;
   byte readdata = 0;
   byte i=8;

   SetSDAInput();
   while (i--){
     readdata<<=1;
     digitalWrite(SCL, HIGH);
     delayMicroseconds(28);
     readdata |= GetDINStatus();  //When this test can not read: readdata |= GetDINStatus()?0x01:0x00;
     digitalWrite(SCL, LOW);
     delay;delay;
     }
   digitalWrite(SCL, LOW);
   delayMicroseconds(28);

   *pbData = readdata;

   SendACKSign();
   
   delay;delay;   
   
   return I2CERR_NO_ERROR;
}

byte readI2C(byte* readtempbuf){   
       
   byte bValue; byte i=0; byte checksum;


   I2CReadData(&bValue);//I2CReadData(byte* pbData) //wjs; read:FCS(1B)//FCS:frame check sequence
   
   if(bValue != 0x00){
      I2CStop(); delay;
      I2CClose(); delay;
               
      return 0;//exit readI2C function
   }
   
   i = 0;
   readtempbuf[i] = bValue;
   checksum = 0xB3;

   for(i = 1; i < 110; i++){         //wjs;read:learndata(109B)+120=230
   
      I2CReadData(&bValue);
      readtempbuf[i] = bValue;
                Serial.println(readtempbuf[i],HEX);
               
      checksum += bValue;
   }
   
   I2CReadData(&bValue);      //wjs;read:CK(1B)
       
   I2CStop(); delay;
   I2CClose(); delay;

   if(bValue != checksum){
                Serial.println("remote_study_checksum_error");
      return 0;
   }
   else{
                Serial.print("remote_study_checksum_ok");
      return 1;
   }

kaeroul
Newbie Pyro
Posts: 2
Joined: Tue Oct 07, 2014 6:30 am

Re: HXD019

Postby kaeroul » Wed Nov 19, 2014 2:49 am

conclusion to date: HXD019 cant learn Air conditioner IR code. 空调不学习


Return to “Put'm Here”

Who is online

Users browsing this forum: No registered users and 2 guests