Want to drive ws2811 LED driver IC with LPC1769

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Want to drive ws2811 LED driver IC with LPC1769

1,273 Views
durgababu2010
Contributor I

i am writing a program for ws2811 led driver IC in Keil UV5 with the PWM peripheral.

For ws2811 led driver,

  • To send a logic one of bit value in byte
    • a "ON "(GPIO pin = high) period of 600 nano Seconds in a total time of 1250 nano Seconds
  • To send a logic zero
      • a "ON"(GPIO pin = high) period of 250 nano Seconds in a total time of 1250 nano Seconds.

I configure the LPC cpu clock as 120Mhz(maximum possible value) and also the PWM pclk as same as CPU clock.

here the problem, is the controller repeatedly was in interrupt handler(it mean, once it goes to interrupt handler and during servicing the interrupt handler,another interrupt is pending,so it is not going to main loop execution)

could any one suggest the other techniques to drive the ws2811 led driver with lpc1769.

Labels (4)
Tags (2)
0 Kudos
5 Replies

1,139 Views
xiangjun_rong
NXP TechSupport
NXP TechSupport

Hi, prasannababu

I have checked the data sheet of ws2811, the "0" logic is T0H=0.5us, T0L=2us. The "1" logic is T1H=2us,T1L=0.5us. If you use PWM module, you have to generate interrupt for each PWM cycle, in other words, the interrupt cycle time is 2.5us, 400KHz, the LPC core is overloaded.

As a solution of brainstorm, can you use I2S module to do it? in other words, you can set the  I2STX_CLK as 2MHz, and connect the I2STX_SDA to DIN of WS2811, if you transfer logic "0", the bit stream is 10000, if you transfer logic "1", the bit stream is 1110, if you want to transfer 1110 data, this is the bit pattern "11110 11110 11110 10000", you can set the word length as 20 bits, in this way, the interrupt frequency will be 20*0.5us=10us, or 10K, it is okay. If you set the bit length as 30bits, the interrupt frequency can be slower, if you use I2S FIFO mode, the interrupt frequency is slower.

Pls consider if the solution is practical.

BR

XiangJun Rong

0 Kudos

1,139 Views
durgababu2010
Contributor I

I will verify and try the above solution and share my results with you

Best regards,

Prasannababu

0 Kudos

1,139 Views
xiangjun_rong
NXP TechSupport
NXP TechSupport

Hi, prasannababu,

I suppose that you can use eFlexPWM module to do the job, for example MC56F84xxx or KV4x, KV5x families.

BR

XiangJun Rong

0 Kudos

1,139 Views
durgababu2010
Contributor I

I working only on LPC1769.

BR

Prasannababu

0 Kudos

1,139 Views
durgababu2010
Contributor I

I will verify and try with solution and share the result with you

0 Kudos