Hi all,
now I am doing my project related smart battery, i am using labview through I2C/Smbus switch PCA9548APW to extract the information from different batteries, because the batteries have the same slave address, then I only can use the PCA9548APW to separate them.
Now my problem is that, when I set up the circuit, and run my labview code, there is no acknowledge from the PCA9548APW.
My code sequence is as:
S-11100000-A -00000001-A-P-S-00010110-A-00001101-A-S-00010111-A-get the data from battery-NA-P.
1. issue the start condition
2. send the PCA9548APW slave address(111000) and write bit(0), because A2,A1,A0 are connected to ground
3. wait for PCA9548APW ack
4. send the channel command(000000001), the only one battery is connected to channel0.
5. wait for PCA9548APW ack
6. issue the stop condition(after this step, i think the master's SDA/SCL has been connect to SD0/SC0.
7. issue the start condition
8. send the battery address(0001011) and write bit(0)
9. wait for PCA9548APW ack
10. send the command(00001101)to battery, i want to read the state of charge from battery
11. wait for PCA9548APW ack
12. issue the start condition again
13. send the battery address(0001011) and read bit(1)
14. wait for PCA9548APW ack
15. get the data(2 bytes) from battery
16. master(USB-8451) send the NA to battery
17. issue the stop condition
can anyone tell me what is the problem of my code sequence?
(i use 5.1K ohm resistor for pullup resistor, and i connect the 3.3v to Vcc of PCA9548APW)
It is very very urgent for me! Thanks very very much for any reply.