Hi,
in the current project, i used a pca9685 pwm ic via I2C.
To speed up the communication i used the adafruit pwm library for the pca9685 and
modified it, so i can write all registers for the 16 outputs in one go. The library use
a 400kHz I2C communication.
So, after the main register settings i set the adress of the led0 output, auto increment
is enabled, writing 4 bytes for led0, writing 4 bytes for led1, writing 4 bytes for led2, etc...
This works fine, but i can only write 7 outputs with this method, outputs 8 to 16 don't
work.
Writing just 6 outputs, end the I2C transmission, start it again with output 7 and writing
6 outputs in one go, etc. works. So, it looks like that the pca9685 or the arduino is running
"out of sync" or similar using long I2C communication? But, I2C is a synchron protocol, with
a clock line, so this shouldn't be the problem.
Does anyone know if there is problem with the autoincrement on the pca9685 with more
than around 30 registers? Or does anyone have a suggestion why it doesn't work that way?
Thanks!
Ciao
Martin