It should be used like a Digital Output, but i can only use I2C that's why i don't have the opportunity to use the GPIOS.
I've already checked the Adresses I am using. The main-adress is "0x60" and to control the PWM's (so the 4 outputs) i am using {0x02, 0x03, 0x04, 0x05}
and to have 5V i should send 0xFF and to have 0V i should send 0x00.
But nothing changes when i send the commands. It still stays at +5V..
The first thing that I do when an I2C device does not work is to run the I2C scanner sketch to confirm communication with the I2C bus and confirm the I2C address of the device. What is returned in serial monitor when you run the scanner sketch?
// I2C scanner by Nick Gammon. Thanks Nick.
#include <Wire.h>
void setup() {
Serial.begin (115200); //***** make sure serial monitor baud matches *****
// Leonardo: wait for serial port to connect
while (!Serial)
{
}
Serial.println ();
Serial.println ("I2C scanner. Scanning ...");
byte count = 0;
Wire.begin();
for (byte i = 1; i < 120; i++)
{
Wire.beginTransmission (i);
if (Wire.endTransmission () == 0)
{
Serial.print ("Found address: ");
Serial.print (i, DEC);
Serial.print (" (0x");
Serial.print (i, HEX);
Serial.println (")");
count++;
delay (1); // maybe unneeded?
} // end of good response
} // end of for loop
Serial.println ("Done.");
Serial.print ("Found ");
Serial.print (count, DEC);
Serial.println (" device(s).");
} // end of setup
void loop() {}
I2C scanner. Scanning ... Found address: 3 (0x3) Found address: 96 (0x60) Done. Found 2 device(s).
AND
And in case you can properly communicate with the PCA9633, then please check the Mode Register 1 bit 4 SLEEP setting. The value needs to be 0 so that the OSC is turn on. If the OSC is turned off, the LEDs cannot be turned on or off.
This is what a "support" of the manufacturer says, but i have no clue what this means.
I mean i have no idea how to "code" this then..
I2C scanner. Scanning ...
Found address: 3 (0x3)
Found address: 96 (0x60)
Done.
Found 2 device(s).
That's correct, the first is the reset all address, the second is the address you've chosen by your wiring.
I would have expected it to react on the 0x70 address too as that is the LED All Call address of the PCA9633.
And in case you can properly communicate with the PCA9633, then please check the Mode Register 1 bit 4 SLEEP setting. The value needs to be 0 so that the OSC is turn on. If the OSC is turned off, the LEDs cannot be turned on or off.
Interesting, I wouldn't have noticed that if they weren't mentioning it. The default value for the SLEEP bit is enabled, so the first thing to do on that chip is to disable sleep state: