Garrett wrote:I actually

Garrett wrote:

I actually have been testing this Arduino code and noticed a flicker too. Mainly, it seems to happen when fading quickly between various colors. I have a theory which I think explains this really well. The A6281 generates its own internal PWM clock, which it uses to vary the intensity of the color. The clock default is 800KHz, which divided by 1024 is about 780 LED updates per second. See where I'm going? The oscillators in each ShiftBrite are free-running, there's no way to know at which point in a PWM cycle you will request a change in brightness. So if you're updating very rapidly, you'll end up jumping into a PWM cycle at random times, resulting in a slight brightness change.

There's two ways to deal with this. First, only update the display when necessary; the longer you wait between updates, the more full PWM cycles will occur and the closer the average brightness of the LED will be to the desired level. Second, the A6281 has a setting to use the data clock as an external PWM source. If your style was really getting cramped by the occasional flicker during fast fades, you could generate your own PWM clocks and sync your color changes to that, always ensuring you have complete PWM cycles.

A better way to deal with this is to toggle the output enable pin when you toggle the latch pin to set your new values. This will sync up the PWM and get rid of the glitching.

Reply

The content of this field is kept private and will not be shown publicly.