The difficulties with multiplexer operation PCA9547PW

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

The difficulties with multiplexer operation PCA9547PW

417 Views
anastasiagteche
Contributor I

Hello! There were difficulties with multiplexer operation PCA9547PW. When connected according to it's datasheet (there are: pin Vdd ->R10k->+3.3V, Vss->GND(MP), RESET ->R10k->+3.3V, A0...A2->pins of microcontroller, SCL(MP)->SCL(mux) with pull-up resistor 10k, SDA(MP)->SDA(mux) with pull-up resistor 10k)  and the module starts, only the data from the sensor was connected to the zero channel (SD0 SC0) is read. Thus, 3 multiplexers PCA9547PW were tested. Sequential cyclic selection of channels is programmed, but the multiplexer continues to read data from the zero channel without connecting the other channels. At work we use the arduino uno processor. The supply circuits are coordinated. During operation, the multiplexer consumption is 3.3 V at a power of 0.002 A. Can you tell me if there are any additional recommendations on the hardware interface of the module with the processor (such as atmega328p-pu). Perhaps you were treated with similar questions and do you have any recommendations? Can be there is an extended technical documentation detailing the hardware-software moments of the multiplexer PCA9547PW?

The code of my program for arduino:

#include <Wire.h>
#include <troyka-imu.h>
#include <lis331dlh.h>

#define MUX 0xE4 //Multiplexer Address
LIS331DLH_TWI accel_1(0x18);

void setup()
{
pinMode(9, OUTPUT);
pinMode(10, OUTPUT);
digitalWrite(10, HIGH);
digitalWrite(9, HIGH);
delay (600);
digitalWrite(9, LOW);
delayMicroseconds(5);
digitalWrite(9, HIGH);
delay (600);
digitalWrite(10, LOW);
delay (600);
digitalWrite(10, HIGH);

Wire.begin();
Serial.begin(9600);
mux(0xF8);
accel_1.begin();
mux(0xFB);
accel_1.begin();
}

void loop()
{
mux(0xF8);
Serial.print("Accelerometer 1");
Serial.println("");
Serial.print(accel_1.readGX());// вывод направления и величины ускорения по оси X
Serial.print("\t\t");
Serial.print(accel_1.readGY());// вывод направления и величины ускорения по оси Y
Serial.print("\t\t");
Serial.print(accel_1.readGZ());// вывод направления и величины ускорения по оси Z
Serial.print("\t\t");
Serial.println("");

delay(1000);
mux(0xFB);
Serial.print("Accelerometer 2");
Serial.println("");
Serial.print(accel_1.readGX());// вывод направления и величины ускорения по оси X
Serial.print("\t\t");
Serial.print(accel_1.readGY());// вывод направления и величины ускорения по оси Y
Serial.print("\t\t");
Serial.print(accel_1.readGZ());// вывод направления и величины ускорения по оси Z
Serial.print("\t\t");
Serial.println("");

}

void mux(byte channel)
{
Wire.beginTransmission(MUX);
Wire.write(channel);//set to selected channel
Wire.endTransmission();
}

0 Kudos
0 Replies