Only if you're using the transistor as an amplifier and not a switch - add NPN's and lower the resistors - all removing the resistors would do is strain the PIC.
Use PNP as 7-segment display selection and NPN for the patterns right?
I think I will just reduce the resistance of the collector, because the PCB space is limited.
Use PNP as 7-segment display selection and NPN for the patterns right?
I think I will just reduce the resistance of the collector, because the PCB space is limited.
But the PIC hasn't got enough current capability - which is why the resistors are there! - check the PIC datasheet, maximum current per pin, and maximum total current.
The purpose is to allow user to process up to 15 different requests, which user has no idea when they will happen in real time but need to service them none the less, and not wishing to test them one by one in an endless loop wasting processor power. In PIC 16F families, all interrupt requests, if enable by the user, would jump to address location 0x0004 regardless.
It is up to user to test for what type of interrupt are requested and then branch to the correct service routine inside the interrupt handler.
In case of AVR, the interrupt is vectored, so different request would jump to different fixed address locations in which user can place the correct jump address for the required handler.
My 2 bob on this thread, given its already evolved quite far, use the UL2003 and Common Cathode 7-Segment displays.
This way you can ditch the resistors on the base of each transistor and directly control the switching via the ULN2003, reducing external components from 8 to 1 for your multiplexing.
**broken link removed**
The ULN2003 acts like an "earth" switch, eg, a high on the input from the PIC will switch the output to earth
The datasheet of ULN2003 shows that there is a 2.7 khm: resistor at the input. So I can use it without a resistor right? And the output logic of the patterns have to be inverted.
The datasheet of ULN2003 shows that there is a 2.7 khm: resistor at the input. So I can use it without a resistor right? And the output logic of the patterns have to be inverted.
The datasheet of ULN2003 shows that there is a 2.7 khm: resistor at the input. So I can use it without a resistor right? And the output logic of the patterns have to be inverted.
That’s correct, a digital "High" (5V) at the input will supply an earth to the output (like a switch to earth), a logic low (0V) will turn off this earth ("open circuit") thus turning the segment/device off
Mike said:
You still need segment current limiting resistors.
A '1' on an input turns on its corresponding output which sinks current the LED segment turning it on.
Stick with common anode displays and use the ULN2003 or ULN2803 to drive the segments.
How can you use the ULN2003/ULN2803 for a common anode segment? They switch earths, not supply voltages - the common +ve supply pin is purely for inductive loads (notice every output has built in diodes to protect from back EMF)
How can you use the ULN2003/ULN2803 for a common anode segment? They switch earths, not supply voltages - the common +ve supply pin is purely for inductive loads (notice every output has built in diodes to protect from back EMF)
Not sure what you mean by a common anode segment but common anode displays have the anode of each segment tied together and supplied or switched at a positive voltage. The other end of each segment requires a sinking driver, like the '2003. A simple example is shown in the post just previous to your last post. You connect the ULN2003 diode connection to the same positive supply that you're using for the common anodes.
I assumed you were describing using a ULN2003 as a sinking driver for a multiplexed common cathode display, using it to replace the sinking NPN drivers in the "common cathode" drawing below. Yes, no?
Oh god, you're correct. I'm muddled, the resistors are needed, they are the load of the collector.
gramo said:
How can you use the ULN2003/ULN2803 for a common anode segment? They switch earths, not supply voltages - the common +ve supply pin is purely for inductive loads (notice every output has built in diodes to protect from back EMF)
That would be complete overkill wouldnt it? Just use the ULN2003 to switch the common cathode for each display - the pic can drive each segment easily, but a resistor for each would still be required to limit the current for each segment.
Mike said:
A "common anode segment"? What the heck are you talkin' about?
That would be complete overkill wouldnt it? Just use the ULN2003 to switch the common cathode for each display - the pic can drive each segment easily, but a resistor for each would still be required to limit the current for each segment.
Yes, I agree, it is "overkill" but it provides you with a full brightness display. If it takes 10-ma per segment at 100% duty cycle for full brightness you're going to need 40-ma per segment pulses at 25% duty cycle for full brightness (and a source driver capable of 40-ma for 7 or 8 segments = 280..320-ma). Driving the segments directly from the PIC pins as you suggest just isn't going to cut it if you need full brightness. Sorry.