Using a PCA9544a to combine two Touch Controllers .....

Gentlemen,

I'm currently building a vintage hifi Amplifier with a Touch Control User interface ......

With the help from Peter_n I learned how to program the chips.

Now I need the next help :wink:

I'm using two semtech SC8644 for the buttones on the left side of the amp and for the volume control on the rigth side of the amp where you can see the LED-Bar.

The problem is, both SX8644 have the same I2C-Adress. To adress them, I use a NXP PCA9544a. Adressing the chips works fine with the chip.

I understood, that I have to analyze the control register of the PCA9544 to understand, on which chanel of the Multiplexer events are generated ....

Now I'm currently trying to understand how to get the interrupt bits analyzed in the interrupt routine of my program .... :o

This is my code ....

// Call Interrup  
  attachInterrupt(4, TouchControlInterrupt, CHANGE);
}

//========================= End of Setup Procedure ================================

//*****************************Interrupt Handling =================================

void TouchControlInterrupt(void)
{
  Serial.println("************* External Event occured *************************");
//  MuxChanel = ReadMuxChanel(I2C_Multiplexer);
  byte RegisterValue;
  I2c.read(I2C_Multiplexer,1, &RegisterValue);
  Serial.println("************* MUX gelesen *************************");
  Serial.print("Register Value: ......... 0x"); Serial.println(RegisterValue, HEX);
  if (RegisterValue & 0B00010000 == 0x10)
  {
    Serial.println("************* Button Chanel left side touched  *************************");
    mux(0);
  }
  else
  if (RegisterValue & 0B00100000 == 0x20)
  {
    Serial.println("************* Slider Chanel right side touched  *************************");
    mux(1);
  }

But something seems to be wrong. The program is always ending in NIRVANA ....

I understood, the buttons on the left generate an interrupt on channel "0", and the slider on the right generates an interrupt on chanel "1" of the PCA9544 by touching the buttons....

This works fine so far....

But I don't know how tp program it in the right way to read them out .....

Maybe I get some help here ......

Regards from Germany

No idea?

For me it's getting clearer, that it has to do with reading the control register of the 9544 ....

Could it be, that there is a special read option ....

I tried to change the different channels, and reading the register from the PCA 9544 shows always "ZERO" .....

NERO_Audiophile:
For me it's getting clearer, that it has to do with reading the control register of the 9544 ....

Could it be, that there is a special read option ....

I tried to change the different channels, and reading the register from the PCA 9544 shows always "ZERO" .....

Is it ok for the code to use

Wire.requestFrom(I2C_Adress, 1 Byte, false) to read the control byte? I only get the result "ZERO" out of the register ....

Still no idea?