View Single Post
Old 10-15-2014, 07:07 PM
CalcProgrammer1 CalcProgrammer1 is offline
Registered User
CalcProgrammer1's PC Specs
Join Date: Oct 2014
Posts: 119
POST ID # = 735749
CalcProgrammer1 Reputation: 20


I'm not about to tear down a $170 keyboard to see what chips are inside, but from marketing (aka the side of the box) we know it has:

* 32-bit ARM processor


* Panasonic display controller

Now, I did a search for Panasonic LED matrix ICs, their website lists 20 results.

Of those results, only 13 are actually matrix drivers. The K70 RGB is almost certainly a matrix due to the number of LEDs (111 LEDs x3 for R/G/B, but up to like 24 more per channel on the K95 RGB). Of those matrix drivers, only one has enough channels to even come close, the AN32181B, which supports a 12x12 matrix. If you remember my reverse engineering, I came up with 144 total slots. 12x12 = 144! I think I'm on to something here.

Here is the AN32181B datasheet:

Unfortunately, it is only a single channel driver, so the datasheet says it's good for up to 48 RGB LEDs. BUT WAIT! The USB protocol clearly splits up red, green, and blue channels into discrete blocks, so it's entirely possible they are using three of these ICs, one per channel. So, what does this chip's actual PWM controller look like?

Here's a screenshot from the PDF's register map:

So what do we have here? If this is the actual chip used, it's pretty darn revealing of what's going on. The chip appears to have 7 PWM drivers, LED1-7, which are matrixed into all 144 LEDs. Each PWM driver has a 4-bit brightness register. Each LED in the matrix has its own "selection" register which chooses which one of the 7 PWM drivers is used to light that LED. The byte layout of these LEDSELx registers matches the USB protocol perfectly (including that there are 72 LEDSEL registers and 72 bytes in each color block). The PWMxCTL registers set a 6-bit PWM value per PWM driver. This gives a total possible bit depth of 6+4, though not completely as there is likely a lot of overlap between low-brightess and low-PWM values.

So, if my hunch is correct and Corsair is using this IC, I believe the PWM drivers are all set to fixed values, in increments of 1/8 from 0 to 100%. Instead of writing PWM values over the USB port, you're actually writing selection values, which selects one of 7 fixed-PWM values for the LED. Since the controller does not actually store a PWM value per-LED and instead only per-controller, actually making each key 8-bit would involve rewriting the PWM channel register very very quickly as it scans the matrix, something that is likely not happening (and dare I say impossible?). The hardware brightness key would then change either the brightness register or scale the 7 PWM channels in a way that adjusts the 7-step scale linearly, which is how it can theoretically generate more than 7 levels though not on different keys simultaneously.

Again, NONE OF THIS IS CONFIRMED, it's just my quick electronics engineering detective investigation given the limited information we have available, but this puzzle fits together all too well. If someone has already ripped the logo off their K70 (or K65/K95) to reveal the screw likely hidden beneath it and wants to completely tear it down I'd really love to know if this is indeed the chip being used. As far as I can tell it's the only Panasonic LED matrix IC that fits the bill.

Last edited by CalcProgrammer1; 10-15-2014 at 07:12 PM.
Reply With Quote