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.

tlhIngan
3,3725 gold badges21 silver badges33 bronze badges
asked Mar 4, 2017 at 16:31

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

answered Feb 4, 2018 at 21:33
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.

answered Mar 4, 2017 at 18:29
1
  • SMBus equivalent commands along with their low level transactions are specified here abyz.me.uk/rpi/pigpio/python.html#i2c_open Commented Sep 8, 2018 at 6:38

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.