In SX Microcontrollers, SX/B Compiler and SX-Key Tool, g_daubach wrote: Hi all, as I had mentioned in my previous post, the additional transistors are only required when the worst-case current load exceeds the maximum limits of the SX. Insofar, I agree with Peter - when you select current-limiting resistors that keep the currents low enough, and the LEDs still have an acceptable brightness, you may just eliminate the transistors. In my example, I wanted to point out that it is not only important to check if any of the SX port pins sources or sinks current beyond the maximum limit (45 mA) but also to make sure that the total current through the Vdd and Vss pins does not exceed the absolute maximum of 130 mA which is often overlooked. Peter suggested to possibly use the four "bank" or row transistors but to omit the eight segment or column transistors. Well, each of the row drivers may need to sink the current of eight LEDs in worst case, where the column drivers need to source the current of four LEDs only. So, with four row driver transistors, the current of 8 * Iled no longer needs to be sinked by the port pins, and it is also bypassed from the Vss pin. In this configuration, the current of 8 * Iled is still distributed among eight column port pins, so the current each port pin needs to source may be below 45 mA. Nevertheless, the SUM, i.e. 8 * Iled is still sourced through the Vdd pin. So when this current is higher than 130 mA, the four row transistors alone don't solve the problem, and the eight column transiostors are required to also bypass the Vdd pin. BTW: I'l like to draw the attention of other readers of Peter's sample code to one line which may not look that important at first glance. It is the first line in the Multiplexer subroutine: Multiplexer mov SinkPort,#%0000_1111 ;drive all bank sinkers high during mux setup to prevent ghosting When you remove the instruction in this line, you may not notice any difference when the LEDs are driven. Nevertheless, this instruction avoids any "glitches". Without setting all row lines high before changing the column output for the next row, the LEDs in the current row would shortly be driven with that pattern until the next row line is driven low. Turning "off" all row lines before changing the column information, and then turning "on" the new row line avoids such unneccessary switching, reduces dissipation losses and EMI. ---------- End of Message ---------- You can view the post on-line at: http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=162118#m162245 Need assistance? Send an email to the Forum Administrator at forumadmin@parallax.com The Parallax Forums are powered by dotNetBB Forums, copyright 2002-2006 (http://www.dotNetBB.com)