Philips Semiconductors
2-bit I2C LED driver with programmable blink rates
Programming example
The following example will show how to set LED0 to blink at 1 Hz at
a 50% duty cycle. LED1 will be set to blink at 4 Hz, 25% duty cycle.
Table 1.
Start
PCA9550 address with A0 = LOW
PSC0 subaddress + auto-increment
Set prescaler PSC0 to achieve a period of 1 second:
Blink period
+
1
+
PSC0 )
38
1
PSC0 = 37
Set PWM0 duty cycle to 50%:
256
– PWM0
256
+
0.5
PWM0 = 128
Set prescaler PCS1 to achieve a period of 0.25
seconds:
Blink period
+
0.25
+
PSC1 )
38
1
PSC1 = 9
Set PWM1 output duty cycle to 25%:
256
– PWM1
256
+
0.25
PWM1 = 192
Set LED0 to PWM0 and set LED1 to blink at PWM1
Stop
I2C-bus
S
COh
11h
25h
80h
09h
C0h
OEh
P
Product data
PCA9550
2003 May 02
9