I recently came into a few gratis A6280 ICs. They're three-channel LED drivers with 10-bit resolution PWM, and super-convenient 31-bit instructions. Aaand I can't for the life of me drive them. I can get them to light up. Sporadically and randomly. On page 7 of the datasheet it talks about the PWM counter, and I realised I may have grievously misread how they work. Do I need to be clocking these guys even when I'm not sending instructions..??
Obviously, I'm new at driving ICs with the Arduino. Would anybody have any idea what sort of code I need here? The shiftout examples on the playground have left me high and dry.
here's the sheet
That's correct, the A6280 doesn't have an internal oscillator so you need to provide a fast clock on the CI pin in order to get the PWM to operate.
Thanks for the help!
In keeping with my poor IC familiarity: if I give this thing a constant clock, periodically “interrupting” the clock with the instuction bits isn’t going to mess anything? Obviously sending stuff in between the clock pulses which advance the PWM will slow stuff down, so do I need to be conscious of this and use PORTD in place of digitalWrite etc… or is that unnecessary?
… or is using an arduino for this just stupid…?
Trying to drive the CI discontinuously will create visible flickers. Using the Arduino in SPI master mode, or any type of software clocking, will not give desirable results.
You'd ideally have some kind of glue logic that can inject the data into the ongoing CI stream and pulse the latch line at the correct instant. Probably looking at a CPLD. I've thought of other solutions like an SPI UART with FIFO but they don't solve the problem of pulsing the latch signal at the correct moment; if you let even one extra clock pulse occur before latching, all the data will be wrong. It's probably okay to stop the clock for an instant while latching.
The A6281 has its own internal clock for this reason...
Bahaha, well that's what I get for scrounging parts. I'm curious now, so I think I might lay down a little cash to play with the 6281's.
Thank you macegr!