adafruit / Adafruit-Raspberry-Pi-Python-Code

Adafruit library code for Raspberry Pi
1.43k stars 686 forks source link

Fixed PWM driver reset #83

Closed sebastianludwig closed 10 years ago

sebastianludwig commented 10 years ago

The previous implementation only set the MODE1 register to 0x00, which is not the default of the PCA9685 (bit 0, ALLCALL, defaults to 1 - see section 7.3.1 in the datasheet) and ignores all other register like MODE2, all output values, etc. The PCA9685 offers a dedicated software reset, which "allows all the devices in the I2C-bus to be reset to the power-up state" (section 7.6).

tdicola commented 10 years ago

Thanks for submitting the changes--just tested them out and they work great. Merging the changes in now. Thanks!