I have a 7 segment display with a common anode which takes around 12 V. There's a 330 Ω resistor connecting each data pin to an ESP8266. To display each number, I'm just tying the requisite pins low. The issue I'm noticing is that the segments that are off are still dimly lit when they're off.
My guess is that since 12 V are coming in and each pin on the microcontroller can only output 3.3 V, there's still current flowing through the LED's because there's too much of a voltage difference (please correct me if I'm wrong).
What are some potential solutions to this problem? I've thought about possibly using a transistor and essentially tying the data pins back to 12 V when the microcontroller emits a positive voltage. That way the voltage different would be 0.
Let me know your thoughts. Thanks!