Dear Team,
We are planning to use Dotstar series addressable LEDs in our next project. As LED frames are sent via one wire/SPI interface, do we need to send the pattern continuously to the LEDs so that it glows continuously in the same color or once we sent the color frame to it, will it continue glowing in same color until we send the next patter after some few seconds? Somebody please explain this since am new to this topic.
Best Regards,
Vyshnav Krishnan
Addressable LED strips working
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
- adafruit_support_bill
- Posts: 88154
- Joined: Sat Feb 07, 2009 10:11 am
Re: Addressable LED strips working
No need for a constant refresh. These pixels will retain the last commanded color until the next command is sent or until the power is cut.
- vyshnavvk
- Posts: 6
- Joined: Wed Feb 22, 2023 3:26 am
Re: Addressable LED strips working
Hi ASB,
Thank you for your quick response. Does it holds same for all one wire and 2-wire LEDs with SPI interface.?
Best Regards,
Vyshnav Krishnan
Thank you for your quick response. Does it holds same for all one wire and 2-wire LEDs with SPI interface.?
Best Regards,
Vyshnav Krishnan
- adafruit_support_bill
- Posts: 88154
- Joined: Sat Feb 07, 2009 10:11 am
Re: Addressable LED strips working
Yes. That is true for Neopixel type one-wire protocols such as the WS2811/WS2812/SK6812 as well as the 2-wire protocols for WS2801 and SK9822 (Dotstar).
- vyshnavvk
- Posts: 6
- Joined: Wed Feb 22, 2023 3:26 am
Re: Addressable LED strips working
Hi ASB,
Thank you for confirming the same.
We are planning to use RA4M2 series of microcontrollers from Renesas and it has SPI interface based on SCI.
Can we use SCI based simple SPI for driving LED strips.? Because on-the board, multiple led strips are been interfaced and controller has one QSPI and One Simple SPI interface.
Kindly confirm we can use SCI interface as well.
Best Regards,
Vyshnav Krishnan
Thank you for confirming the same.
We are planning to use RA4M2 series of microcontrollers from Renesas and it has SPI interface based on SCI.
Can we use SCI based simple SPI for driving LED strips.? Because on-the board, multiple led strips are been interfaced and controller has one QSPI and One Simple SPI interface.
Kindly confirm we can use SCI interface as well.
Best Regards,
Vyshnav Krishnan
- adafruit_support_bill
- Posts: 88154
- Joined: Sat Feb 07, 2009 10:11 am
Re: Addressable LED strips working
The one-wire protocols are not SPI protocols at all. They do not have a clock signal so timing on the single data line is critical. Our libraries use hand-tuned assembly code to meet the timing requirements. You would need to do the same to port the code to a different microcontroller.
The 2-wire protocols could be called "SPI". But SPI does not have a standard interface specification and there are many manufacturer-specific variants. Not all of these are compatible. You would need to test with your processors to see if it works.
The 2-wire protocols could be called "SPI". But SPI does not have a standard interface specification and there are many manufacturer-specific variants. Not all of these are compatible. You would need to test with your processors to see if it works.
- vyshnavvk
- Posts: 6
- Joined: Wed Feb 22, 2023 3:26 am
Re: Addressable LED strips working
Hi ASB,
Thank you for the quick response and explanation.
Best Regards,
Vyshnav Krishnan
Thank you for the quick response and explanation.
Best Regards,
Vyshnav Krishnan
- vyshnavvk
- Posts: 6
- Joined: Wed Feb 22, 2023 3:26 am
Re: Addressable LED strips working
Dear AST,
I had one more query regarding PWM LEDs. As per the requirements from customer,
Each LED output should have its own 8-bit resolution (256 steps) fixed frequency individual PWM controller that operates at 31.25 kHz with a duty cycle that is adjustable from 0 % to 99.6 % to allow the LED to be set to a specific brightness value.
But the controller which we have found has spec as below,
Each LED output has its own 8-bit resolution (256 steps) fixed frequency individual PWM controller that operates at 97 kHz with a duty cycle that is adjustable from 0 % to 99.6 % to allow the LED to be set to a specific brightness value.
Will the difference between the fixed frequency be a problem.?
Best Regards,
Vyshnav Krishnan
I had one more query regarding PWM LEDs. As per the requirements from customer,
Each LED output should have its own 8-bit resolution (256 steps) fixed frequency individual PWM controller that operates at 31.25 kHz with a duty cycle that is adjustable from 0 % to 99.6 % to allow the LED to be set to a specific brightness value.
But the controller which we have found has spec as below,
Each LED output has its own 8-bit resolution (256 steps) fixed frequency individual PWM controller that operates at 97 kHz with a duty cycle that is adjustable from 0 % to 99.6 % to allow the LED to be set to a specific brightness value.
Will the difference between the fixed frequency be a problem.?
Best Regards,
Vyshnav Krishnan
- adafruit_support_bill
- Posts: 88154
- Joined: Sat Feb 07, 2009 10:11 am
Re: Addressable LED strips working
There are two frequencies associated with the SK9822 "Dotstar" pixels.
The Update frequency is the frequency of the data clock for sending data. This is controlled by the microcontroller and somewhat dependent on the speed of the microcontroller you are using. The pixels are capable of handling update clock rates up to 32MHz. This is achievable on a Raspberry Pi. But an Arduino UNO can update at a max speed of just 8MHz.
The PWM frequency is the frequency of the pulses driving the LEDs. This and internal to the chip and fixed at 19.2KHz.
The Update frequency is the frequency of the data clock for sending data. This is controlled by the microcontroller and somewhat dependent on the speed of the microcontroller you are using. The pixels are capable of handling update clock rates up to 32MHz. This is achievable on a Raspberry Pi. But an Arduino UNO can update at a max speed of just 8MHz.
The PWM frequency is the frequency of the pulses driving the LEDs. This and internal to the chip and fixed at 19.2KHz.
That is dependent on the application. 19.2KHz is fast enough for most applications - including those involving Persistence of Vision (POV). For projects involving high-speed photography or cinematography, some frequency-related artifacts may become visible at higher speeds.Will the difference between the fixed frequency be a problem.?
- vyshnavvk
- Posts: 6
- Joined: Wed Feb 22, 2023 3:26 am
Re: Addressable LED strips working
Hi ASB,
Thank you for the detailed explanation.
Best Regards,
Vyshnav Krishnan
Thank you for the detailed explanation.
Best Regards,
Vyshnav Krishnan
Please be positive and constructive with your questions and comments.