PCA9685 All information provided in this document is subject to legal disclaimers. © NXP Semiconductors N.V. 2015. All rights reserved.
Product data sheet Rev. 4 — 16 April 2015 16 of 52
NXP Semiconductors
PCA9685
16-channel, 12-bit PWM Fm+ I
2
C-bus LED controller
7.3.2 Mode register 2, MODE2
[1] See Section 7.7 “Using the PCA9685 with and without external drivers for more details. Normal LEDs can be driven directly in either
mode. Some newer LEDs include integrated Zener diodes to limit voltage transients, reduce EMI, protect the LEDs and these must be
driven only in the open-drain mode to prevent overheating the IC. Power on reset default state of LEDn output pins is LOW.
[2] Change of the outputs at the STOP command allows synchronizing outputs of more than one PCA9685. Applicable to registers from
06h (LED0_ON_L) to 45h (LED15_OFF_H) only. 1 or more registers can be written, in any order, before STOP.
[3] Update on ACK requires all 4 PWM channel registers to be loaded before outputs will change on the last ACK.
[4] See Section 7.4 “
Active LOW output enable input for more details.
7.3.3 LED output and PWM control
The turn-on time of each LED driver output and the duty cycle of PWM can be controlled
independently using the LEDn_ON and LEDn_OFF registers.
There will be two 12-bit registers per LED output. These registers will be programmed by
the user. Both registers will hold a value from 0 to 4095. One 12-bit register will hold a
value for the ON time and the other 12-bit register will hold the value for the OFF time. The
ON and OFF times are compared with the value of a 12-bit counter that will be running
continuously from 0000h to 0FFFh (0 to 4095 decimal).
Update on ACK requires all 4 PWM channel registers to be loaded before outputs will
change on the last ACK.
The ON time, which is programmable, will be the time the LED output will be asserted and
the OFF time, which is also programmable, will be the time when the LED output will be
negated. In this way, the phase shift becomes completely programmable. The resolution
for the phase shift is
1
4096
of the target frequency. Table 7 lists these registers.
The following two examples illustrate how to calculate values to be loaded into these
registers.
Table 6. MODE2 - Mode register 2 (address 01h) bit description
Legend: * default value.
Bit Symbol Access Value Description
7 to 5 - read only 000* reserved
4INVRT
[1]
R/W 0* Output logic state not inverted. Value to use when external driver used.
Applicable when OE
=0.
1 Output logic state inverted. Value to use when no external driver used.
Applicable when OE
=0.
3 OCH R/W 0* Outputs change on STOP command
[2]
.
1 Outputs change on ACK
[3]
.
2OUTDRV
[1]
R/W 0 The 16 LEDn outputs are configured with an open-drain structure.
1* The 16 LEDn outputs are configured with a totem pole structure.
1to0 OUTNE[1:0]
[4]
R/W 00* When OE = 1 (output drivers not enabled), LEDn = 0.
01 When OE
= 1 (output drivers not enabled):
LEDn = 1 when OUTDRV = 1
LEDn = high-impedance when OUTDRV = 0 (same as OUTNE[1:0] = 10)
1X When OE = 1 (output drivers not enabled), LEDn = high-impedance.
PCA9685 All information provided in this document is subject to legal disclaimers. © NXP Semiconductors N.V. 2015. All rights reserved.
Product data sheet Rev. 4 — 16 April 2015 17 of 52
NXP Semiconductors
PCA9685
16-channel, 12-bit PWM Fm+ I
2
C-bus LED controller
Example 1: (assumes that the LED0 output is used and
(delay time) + (PWM duty cycle) 100 %)
Delay time = 10 %; PWM duty cycle = 20 % (LED on time = 20 %; LED off time = 80 %).
Delay time = 10 % = 409.6 ~ 410 counts = 19Ah.
Since the counter starts at 0 and ends at 4095, we will subtract 1, so delay time = 199h
counts.
LED0_ON_H = 1h; LED0_ON_L = 99h (LED start turn on after this delay count to
409)
LED on time = 20 % = 819.2 ~ 819 counts.
LED off time = 4CCh (decimal 410 + 819 1 = 1228)
LED0_OFF_H = 4h; LED0_OFF_L = CCh (LED start turn off after this count to 1228)
Example 2: (assumes that the LED4 output is used and
(delay time) + (PWM duty cycle > 100 %)
Delay time = 90 %; PWM duty cycle = 90 % (LED on time = 90 %; LED off time = 10 %).
Delay time = 90 % = 3686.4 ~ 3686 counts 1 = 3685 = E65h.
LED4_ON_H = Eh; LED4_ON_L = 65h (LED start turn on after this delay count to
3685)
LED on time = 90 % = 3686 counts.
Since the delay time and LED on period of the duty cycle is greater than 4096 counts,
the LEDn_OFF count will occur in the next frame. Therefore, 4096 is subtracted from
the LEDn_OFF count to get the correct LEDn_OFF count. See Figure 9
, Figure 10 and
Figure 11
.
LED off time = CCBh (decimal 3685 + 3686 = 7372 4096 = 3275)
LED4_OFF_H = Ch; LED4_OFF_L = CBh (LED start turn off after this count to 3275)
Fig 7. LED output, example 1
Fig 8. LED output, example 2
0
STOP
example 2
LEDn_ON
LEDn_OFF
4095
0
3685
4095 0 4095 0
002aad813
3275
3685
3275
3685
LED ON (90 %)
PCA9685 All information provided in this document is subject to legal disclaimers. © NXP Semiconductors N.V. 2015. All rights reserved.
Product data sheet Rev. 4 — 16 April 2015 18 of 52
NXP Semiconductors
PCA9685
16-channel, 12-bit PWM Fm+ I
2
C-bus LED controller
Example 1: LEDn_ON (511) < LEDn_OFF (3071)
Example 2: LEDn_ON (2047) > LEDn_OFF (767)
Example 3: LEDn_ON[12] = 1; LEDn_ON[11:0] = 1022; LEDn_OFF[12] = 0; LEDn_OFF[11:0] = don’t care
Example 4: LEDn_ON[12] = 0; LEDn_OFF[12] = 0; LEDn_ON[11:0] = LEDn_OFF[11:0]
Fig 9. Output example
0
STOP
example 1
LEDn_ON
LEDn_OFF
4095 0
511
3071
511
3071
4095
0
511
3071
4095
0
LEDn_ON
LEDn_OFF
2047 2047
767
example 2
2047
767
002aad193
LEDn_ON
example 3
LEDn_ON
LEDn_OFF
example 4
1023
off
1023
1023

PCA9685BS,118

Mfr. #:
Manufacturer:
NXP Semiconductors
Description:
LED Display Drivers 16-CH 12-BIT PWM FM+ I2C-BUS LED CTRL
Lifecycle:
New from this manufacturer.
Delivery:
DHL FedEx Ups TNT EMS
Payment:
T/T Paypal Visa MoneyGram Western Union