0

I have this breadboard circuit, which is basically a 65C02 CPU that has 16 Address pins. I want to wire these up to LEDs. Below, I've connected them directly, which is likely all kinds of bad (Too much load on the CPU? Resistor needed yes/no?), and I wonder which would be the correct way to connect this.

IC to LEDs

From my very limited understanding, it appears that using a Transistor is what I'd want - I would supply the actual LED Power from elsewhere, and only use the A0..A15 pins to Switch them on/off. Something like this maybe?

schematic

simulate this circuit – Schematic created using CircuitLab

Would this be correct, or is there something else that's usually being done? It seems that digital circuits would use MOSFETs instead of regular NPN transistors, but I've never used either, hence the question.

Michael Stum
  • 1,319
  • 2
  • 9
  • 11
  • 1
    You want to visualize the address bus using LEDs? ($C_1$ would seem to be a problem to me as would using the BJTs as emitter followers -- assuming $C_1$ were absent.) Are you planning on single-stepping this? If so, perhaps read adding a front panel to the 6502. – jonk Mar 30 '19 at 04:39
  • @jonk Thanks, I've corrected it, C1 is meant as a decoupling capacitor. jonk, I'll look at that link - Single Stepping or using a low frequency (1 Hz or lower) is the initial plan for this, I have a variable clock source. – Michael Stum Mar 30 '19 at 05:07
  • 1
    Putting LEDS and resistors in collectors of transistors will probably work better for you. – Russell McMahon Mar 30 '19 at 09:34
  • @RussellMcMahon Thanks for pointing that out, I now understand the importance of VBE/Saturation and why the load is normally on the Collector. – Michael Stum Apr 01 '19 at 22:18
  • @MichaelStum That is certainly one aspect - but there is even more. With load in the emitter the VOLTAGE gain is effectively unity. With the load in the collector the current gain is transistor Beta so Icmax = Ib x Beta = (Vb-Vbe)/Rb and voltage gain is (nobody believes this :-) ) 38.4 x voltage across the load for a grounded emitter or fully bypassed emitter resistor - subject to available voltage - ie with enough vin you saturate before reaching max gain (which is in fact the object in this case. || The emitter follower is effectively a unity gain buffer and also has an immensely ... – Russell McMahon Apr 02 '19 at 04:28
  • ... role seldom seen. If you drive base with say 5V and Vbe = say 0.6V (typical) then voltage across Re = 4.4V. (in this case). So for eg Re = 4k7, Ie = V/R = 4.4/4k7 = 0.94 mA. Call that 1 mA. Now, put say 300V on collector via say 10K. Now , when the transistor is turned on it draws 1 mA and the voltage across the 10K is V = IR = 1 mA x 10k = 10V. If you use that to drive a high side P Channel FET (or whatever) you have a safely limied 10V swing 300V (or any other V) above ground. | Transistor dissipation needs to be watched. Here Pc = V x I = 300 x 1 ma = 300 mW. What can handle that? – Russell McMahon Apr 02 '19 at 04:36
  • ... The (sadly obsolete) MPSA44 TO92 case bipolar can ! :-). The MPSA43 handles 300V and the MPSA42 200V. Sadly the MPSA45 never seemed to exist :-). || For the brave !!! SOT23 500V PMBTA45 – Russell McMahon Apr 02 '19 at 04:38
  • ... The (sadly obsolete) MPSA44 TO92 case bipolar can ! :-). The MPSA43 handles 300V and the MPSA42 200V. Sadly the MPSA45 never seemed to exist :-). || For the brave !!! SOT23 500V PMBTA45 | For the insane - SOT223 1200V STN0214 – Russell McMahon Apr 02 '19 at 04:45

1 Answers1

2

That will work okay, and it saves the base resistors that you'd use in the more usual configuration.

You can also use something like a ULN2803 which has 8 drivers rather than the individual transistors.

Unfortunately, those bar graph things tend to have really crummy LED dice in them and require relatively large current for reasonable brightness.

Spehro Pefhany
  • 397,265
  • 22
  • 337
  • 893
  • I would say the common way is to put the load at the high side when switching with a npn-transistor, what's your opinion? – Sim Son Mar 31 '19 at 00:20
  • Thanks. Ordered some ULN2803APG to try. @SimSon For Collector v. Emitter, I found this question, though I still have to work on understanding it, but it seems that having the load on the Emitter means that the switching voltage might not be enough anymore? Using Base as the Switch to open the connection Collector-Emitter is still correct though? – Michael Stum Mar 31 '19 at 05:34
  • 1
    Ah, I see, as you want to switch a device that (considering the voltage needed to switch) could also be driven with the base voltage, you just need to switch a current higher than the uC can provide. That's why it will work here, but nevertheless I would switch the leds at the high end, like one would do to switch higher voltages – Sim Son Mar 31 '19 at 13:38
  • Did a bunch more research and finally get it - VBE/Saturation Voltage is the voltage betwen Base and Emitter to turn on the transistor - normally around 0.7V. But adding a load to the Emitter requires a much higher voltage on the base. That also made me understand "Open Collector" in an IC: It means that the Collector pin is the Output Pin, Base is the Input, and the Emitter goes to common ground. And a transistor amplifies current (Gain/hFEBeta), so a resistor on the base limits the current amplification. – Michael Stum Apr 01 '19 at 22:17
  • Really you should get the input voltage minus about 0.7V on the emitter for reasonable loads provided you have at least the input voltage on the collector. You can have more but it won’t make much difference (the transistor will run warmer). – Spehro Pefhany Apr 02 '19 at 00:33