I've read that I need to drive a PNP using an NPN, are there any better ways?
I keep seeing shift register come up as a high side switch, but I don't see how that is possible?
What about using FETs?
there are 2 different 7 segment displays:one with a common anode or one with a common cathode.with the common anode you connect the (1 or 2) anodes with the +12V and the other 8 cathodes via an normal NPN-transistor (eg: 2n2222) to the GND.with the common cathode you connect the (1 or 2) cathodes with the GND and the other 8 anodes via an PNP-transistor to the +12V.I would go for the first option and control the NPN-transistors via 4 shift regs
To drive the common anodes, check out the UDN2981a, see http://www.rapidonline.com/pdf/82-2202.pdf. This contains 8 high side drivers each capable of switching up to 50v from a 5v control signal. The only snag is that the voltage drop in them is almost 2v, whereas a good PNP transistor would only drop around 0.2v.
How about driving 4 TPIC6B595 shift registers via SPI interface, one for each digit? Yeah, its not multiplexing, but its easy write the digits, they handle 12 volts, don't need high side drivers.They handle 150mA per segment. 84 cents at Avnet.https://avnetexpress.avnet.com/store/em/EMController/Counter-Shift-Register/Texas-Instruments/TPIC6B595N/_/R-1750249/A-1750249/An-0?action=part&catalogId=500201&langId=-1&storeId=500201&listIndex=-1Or use a 6D595, 100mA/segment for 57 cents.https://avnetexpress.avnet.com/store/em/EMController/Counter-Shift-Register/STMicroelectronics/STPIC6D595B1R/_/R-5750380/A-5750380/An-0?action=part&catalogId=500201&langId=-1&storeId=500201&listIndex=-1Only need 3 pins - SS, SCK, MOSI, sometimes all the multiplexing is just not worth hassle!Both available in multiple surface mount versions as well.
Yes, can mulitplex the shift register across the digits. Still need to switch the 12V on/off to the common cathode of the digits tho.I' d personally ditch that board you have, get an "island of holes" board, futurlec.com has plenty of options, cut down to size you need, and have the WHOLE board available for use. You're backed into a corner with that thing.http://www.futurlec.com/ProtoBoards.shtml $1.50
digitalWrite(SS, LOW);SPI.transfer (digit1); // data can come from an array even: SPI.transfer ( displayArray[digit1data] );SPI.transfer (digit2);SPI.transfer (digit3);SPI.transfer (digit4);digitalWrite(SS, HIGH);[code]and in the rest of void loop you create/determine/whatever the digit data will be.displayArray[0-9] will be the high/lows that create your display of a 0, 1, 2, ...9 or maybe letters A,b,c,C,d,E,F,g,h,i,J,L,P,U