
PCA9532_4 © NXP B.V. 2009. All rights reserved.
Product data sheet Rev. 04 — 17 March 2009 14 of 29
NXP Semiconductors
PCA9532
16-bit I
2
C-bus LED dimmer
8.2 Programming example
The following example will show how to set LED0 to LED3 on. It will then set LED4 and
LED5 to blink at 1 Hz at a 50 % duty cycle. LED6 and LED7 will be set to be dimmed at
25 % of their maximum brightness (duty cycle = 25 %). LED8 to LED15 will be set to off.
Fig 15. High value resistor in parallel with
the LED
Fig 16. Device supplied by a lower voltage
002aac189
LED
V
DD
LEDn
100 kΩ
V
DD
002aac190
LED
V
DD
LEDn
3.3 V 5 V
Table 11. Programming PCA9532
Program sequence I
2
C-bus
START S
PCA9532 address with A0 to A2 = LOW C0h
PSC0 subaddress + Auto-Increment 12h
Set prescaler PSC0 to achieve a period of 1 second:
PSC0 = 151
97h
Set PWM0 duty cycle to 50 %:
PWM0 = 128
80h
Set prescaler PCS1 to dim at maximum frequency:
PSC1 = 0
00h
Set PWM1 output duty cycle to 25 %:
PWM1 = 64
40h
Set LED0 to LED3 on 55h
Set LED4 and LED5 to PWM0, and LED6 or LED7 to PWM1 FAh
Set LED8 to LED11 off 00h
Set LED12 to LED15 off 00h
STOP P
Blink period 1
PSC0 1+
152
------------------------
==
PWM0
256
-----------------
0.5=
Blink period max=
PWM1
256
-----------------
0.25=
urenrjrjkvnm
coin