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 25 of 52
NXP Semiconductors
PCA9685
16-channel, 12-bit PWM Fm+ I
2
C-bus LED controller
7.3.4 ALL_LED_ON and ALL_LED_OFF control
The ALL_LED_ON and ALL_LED_OFF registers allow just four I
2
C-bus write sequences
to fill all the ON and OFF registers with the same patterns.
The LEDn_ON and LEDn_OFF counts can vary from 0 to 4095. The LEDn_ON and
LEDn_OFF count registers should never be programmed with the same values.
Because the loading of the LEDn_ON and LEDn_OFF registers is via the I
2
C-bus, and
asynchronous to the internal oscillator, we want to ensure that we do not see any visual
artifacts of changing the ON and OFF values. This is achieved by updating the changes at
the end of the LOW cycle.
7.3.5 PWM frequency PRE_SCALE
The hardware forces a minimum value that can be loaded into the PRE_SCALE register
at ‘3’. The PRE_SCALE register defines the frequency at which the outputs modulate. The
prescale value is determined with the formula shown in Equation 1
:
(1)
where the update rate is the output modulation frequency required. For example, for an
output default frequency of 200 Hz with an oscillator clock frequency of 25 MHz:
(2)
The maximum PWM frequency is 1526 Hz if the PRE_SCALE register is set "0x03h".
The minimum PWM frequency is 24 Hz if the PRE_SCALE register is set "0xFFh".
The PRE_SCALE register can only be set when the SLEEP bit of MODE1 register is set to
logic 1.
Table 8. ALL_LED_ON and ALL_LED_OFF control registers (address FAh to FEh) bit description
Legend: * default value.
Address Register Bit Symbol Access Value Description
FAh ALL_LED_ON_L 7:0 ALL_LED_ON_L[7:0] W only
0000 0000*
LEDn_ON count for ALL_LED, 8 MSBs
FBh ALL_LED_ON_H 7:5 reserved R
000*
non-writable
4 ALL_LED_ON_H[4] W only
1*
ALL_LED full ON
3:0 ALL_LED_ON_H[3:0] W only
0000*
LEDn_ON count for ALL_LED, 4 MSBs
FCh ALL_LED_OFF_L 7:0 ALL_LED_OFF_L[7:0] W only
0000 0000*
LEDn_OFF count for ALL_LED,
8 MSBs
FDh ALL_LED_OFF_H 7:5 reserved R
000*
non-writable
4 ALL_LED_OFF_H[4] W only
1*
ALL_LED full OFF
3:0 ALL_LED_OFF_H[3:0] W only
0000*
LEDn_OFF count for ALL_LED,
4 MSBs
FEh PRE_SCALE 7:0 PRE_SCALE[7:0] R/W
0001 1110*
prescaler to program the PWM output
frequency (default is 200 Hz)
prescale value round
osc_clock
4096 update_rate
--------------------------------------------------
1–=
prescale value round
25 MHz
4096 200
---------------------------
1– 30 0x1Eh==