I am currently struggling a lot with a tedious issue - I have to control my 7-segment display with a CD4511 decoder. However, my display is Common Anode, and it is not changable in my case. The best I got out of the situation is that the numbers were inverted(lights that should be on are off and vise versa). Later on, I have connected 7 transistors in order to reverse all the outputs of the chip, which resolved the issue, but only partially. Yes, the lights were on when they needed to be, however, my project REQUIRES to use only one transistor.
So, I used the PNP transistor, connecting the collector to the common of 7-segment display, base to arduino digital pin(and setting this pin to low) and the emitter to 5V. The result I am getting is that the needed lights DO light up, but only for a mere second, instantly turning off afterwards. Is there anything I can do to properly invert the display?