Hi all,
We are using TCA6507 in one of our designs. Here, LED0 is connected to Blue LED & LED1 is connected to Red LED.
We want to blink both the LEDs once in 4 second period but want to have 1 second delay between the Blue & Red LED blink.
To achieve this we thought of using two separate PWMs - PWM0 to drive Blue LED & PWM1 to drive Red LED.
Below is the sequence of register writes we followed.
# Configure Blue LED to work with PWM0 & Red LED with PWM1
REG 0x00 - 0x01
REG 0x01 - 0x03
REG 0x02 - 0x03
# PMW0 settings - ON period - 256ms , OFF period - 4.096s
REG 0x03 - 0x00
REG 0x04 - 0x44
REG 0x05 - 0x00
REG 0x06 - 0x00
REG 0x07 - 0x0C
Delay of 1 secs
#Setting PWM1 off period
REG 0x07 - 0xCC
Basically, both PWM0 & PWM1 timings are same,but we are delaying the setting of PMW1 timing registers which should help us in providing the required delay between Red & Blue LED blinks.
This is working first few times , but if we execute the same code repeatedly, then the time difference between Red & Blue LED blink varies. Even though the blink period of 4 secs remains unchanged, the timing relationship between the Red & Blue vary randomly.
What can be the reason for this behavior ?
Are we missing out something in the register configurations ?
Please suggest.
We look forward to your response.
Thanks,
Suresha N S