Note that there is a difference in the efficiency of 7-segment displays. I think typically you will see people use transistors on the CA/CC pins to transfer the current burden away from the Arduino while still having bright displays. The HC595 should work the same way, and it has its limits just as the Arduino does, both per pin and in the aggregate. The issue, as you say, is how much current that will be. ![]() So if a pin can sink 8 segments of current from a common cathode display, it should also be able to source 8 segments of current to a common anode display. I believe the 328P sources or sinks the same amount of current per I/O pin. In that way, I have to cycle through 4x8=32 leds.ī) Use 5v pin together with 4 PNP transistors to connect them to the 4 common anode pins (so that I have enough power for all 8 leds of a digit to light them simultaneously) and use 74hc595 for the 8 cathode pins.ĮDIT: Perhaps I can't even do the common cathode with outpins too and need NPN transistors? How can an output pin set to LOW sink the current of all 8 digit leds?Īddressing your issue in (2), it should work the same in both directions. However, I can't understand how this can possibly work! Can an output pin provide power for as many as 8 digit leds?Ī) Use output pins for the 4 common anode pins (set them LOW initially) and output pins for the 8 cathode pins (set them HIGH initially), set HIGH an anode pin of a specific digit and then cycle through the 8 digit leds, having only one set LOW at any time, so that only one led is powered each time. When using 4 digit 7-segment display (common anode): I've read many tutorials that claim that I can use the reverse procedure from above: use output pins for the 4 common anode pins and then use 74hc595 to sink the 8 cathode pins.Then I wire the 8 anode pins to 74hc595 and light the leds of a single digit simultaneously (as long as I use small current for each digit led, to account for the fact that 74hc595 has maximum total current 70ma, ideally 6ma for each digit led). ![]() When using 4 digit 7-segment display (common cathode): I wire the 4 common cathode pins to output pins, set them all HIGH initially and set a specific one LOW to enable a specific digit.Please advise me if what I say is correct:
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |