1

I'm using a PCA9585 board with an I2C interface to control LED lights. I can control each LED separately or control them all at the same time. What I would like to accomplish is to program multiple specific channels starting with a I2C start command and then have the PCA9685 respond to the new programming when I send an I2C stop command. Right now when I program each channel you can see each LED respond separately (like turning channels 3,5,7,9,12 off) with a short delay between each one. That's not exactly what I want to accomplish.

I'm using python and the smbus library on a Raspberry Pi. I have read the PCA9685 documentation, and there is a mode in which the system will respond to the new programming when an I2C stop command is issued on the I2C bus.

I just don't know how to issue the START and STOP commands. Any help is greatly appreciated.

2 Answers 2

1

Try using the PIGPIO library, it allows Bit Banging on the I2C bus; it is also much better when interfaceing to the GPIO pins

0

Each SMBus command starts with a start condition and ends with a stop condition. There is no SMBus (or I2C) command which simply issues a start or stop condition.

You need to find an SMBus (or I2C) command which sends all the data you want to send or bit bang the protocol.

1
  • SMBus equivalent commands along with their low level transactions are specified here abyz.me.uk/rpi/pigpio/python.html#i2c_open
    – a2f0
    Sep 8, 2018 at 6:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.