PCA9685_2
NXP B.V. 2009. All rights reserved.
Product data sheet
Rev. 02 — 16 July 2009
24 of 50
NXP Semiconductors
PCA9685
16-channel, 12-bit PWM Fm+ I2C-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 I2C-bus write sequences
to ll 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 I2C-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 denes 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 frequency of 200 Hz with an oscillator clock frequency of 25 MHz:
(2)
The PRE_SCALE register can only be set when the SLEEP bit of MODE1 register is set
to logic 1.
Table 7.
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 output
frequency
prescale value
round
osc_clock
4096
update_rate
×
--------------------------------------------------
1
–
=
prescale value
round
25 MHz
4096
200
×
---------------------------
1
–
30
=