I'm investigating some RGBLED-related code in pslab-python and pslab-firmware. I've discovered that the WS2812B method can set the color of the WS2812B LED on the new (v6) board when called with
output="CS1". Cool, so far so good.
However, I get confused when I look at the firmware. The WS2812B method puts the firmware state machine into this state, which uses an output called CSOUT1 to send a pulse train to the LED. CSOUT1 is AKA _LATB5, which if I understand my Microchip-C correctly is used to set pin RB5 HIGH/LOW. However, the WS2812B on the v6 is not connected to RB5, but to RB2 according to the schematics (I've verified that this is correct with a multimeter).
The WS2812B method can also be called with
output="SQR1". SQR1 is clear enough, and looking at the firmware CS2 should be controlling RB6 (which is labelled PGC on the board). Indeed, looking at PGC with the logic analyzer while calling WS2812B() with
output="CS2" confirms this. But
output="CS1" does not seem to control RB5/PGD, but rather RB2.