I have 4 common-anode RGB LEDs in a 4x3 matrix. I have a BSS138 on each of the red, green and blue cathode lines and a BSS84 on each of the anode pins. The power supply is 3.3v, which is close enough to Vf for each LED (red is slightly lower, and there is a 5Ω series resistor just before the red MOSFET drain to compensate).
When the matrix is not being driven at all, all the LEDs are dark. When I perform rastering, I get ghosting. The ghosting is quite low, so I could probably live with it, but I'd like to know what's causing it.
The gates are driven by a microcontroller and the gate waveforms are clean and square. When I look at the drains of the MOSFETs, their on-state is correct (either 0v for the cathode lines or 3.3v for the anodes), but the off-state voltage of the anode MOSFETs is like a downward ramp - like discharging a capacitor.
If I add a ~50k or so pull-down resistor to the anode MOSFET drain the problem goes away and the on-state drain waveform becomes square, like you'd expect.
The rastering duty cycle is 25% - that is, I actually have a huge dead-band between each anode activation period. The raster rate is one period every 125 microseconds. So the full raster is 16 periods - LED 1, then 3 off, LED 2, then 3 off etc (they're very bright LEDs).
Is a pull-down on the drain something to be expected to be necessary in this situation?
EDIT: Complete schematic is at https://hackaday.io/project/166766-Симон in the Files section.