I have an array of LED which is formed as 5 digit 7 segment display (common Anode). I need to display the value from a PC using serial communication using adruino uno and this 5 digit 7 segment display. Is there a library for that we can use immediately for this program? and also on the hardware side, should I use only arduino uno or can I use max72xx?
The secret is always to divide & conquer: if you can't see how to solve the whole problem, break it down into smaller & smaller problems until you get to a point that you can solve the small problems.
Then build the small solutions into a full solution to the big problem.
Here, two separate problems are immediately apparent:
Controlling a 5-digit 7-segment display;
Receiving data from a PC using serial communication.
If the first seems like too much, start by considering just a single digit - divide & conquer!
Probably not.
But there will be libraries that can help with the individual parts - try an internet search including "Arduino" and "code" ...
You could use a chip, or you could use just the Arduino - it's entirely up to you.
Are you more comfortable with software or hardware?
I would like to create it using adruino uno only but while I was searching through the internet Uno has only 13 digital outputs. And I am gonna use my 2 digital outputs as software serial. I will post my program later. The hardest part is the programming since I am still learning on it
You can use pins A0 to A5 as digital outputs also.
Why do you need software serial?
It would be easy to damage the Uno with your circuit. Post a schematic here showing how you plan to wire everything and we can check that it will not cause damage.
that will not work reliable.
If you consider to use multiplexing 5x7 your common pin can not source enough current for all 7 segments on one digit.
Furthermore you will need at least resistors for each segment.
So there is no way to do it with an Arduino only.
Make your live easier and consider one of the premade modules (or breakout boards) with a dedicated LED driver IC like MAX7219, TM1637 or HT16K33. Stay away from shift registers for that purpose.
No. Always some circuits are needed between the Uno and the display. The simplest is a resistor for each digit. However, this can only be used if the voltage required is 5V or less, the segment current is below ~30mA and you do not need the display to be bright. For displays that require higher voltages or currents or where the display needs to be brighter, more complex driver circuits are required.
Post details of your display including the forward voltage and maximum current for the segments.
MAX7219 is designed for use with common cathode displays. It is possible to use the chip with common anode, but it is more difficult to write the code and many example codes will not work.
I am using softwareserial since the data is from the PC. I do not know. I just read some articles that I got the idea to use softwareserial. Am I wrong?
alright I'll check on this ICs. I also search for this LED drivers. I found out that my LED array 7 segments cannot be supplied with only 5v. And I also tried it in actual. It needs at least 12v with ample current to drive it. But I will still need to check first the program then I will problem about how to drive the LED array. Thanks for the advice I will check on these ICs.
When you connect Uno to PC with USB cable, you are using its (only) hardware serial port. No need for software serial.
If the cathodes are not connected in common, you can use 5x TPIC6B595 chips to drive your display (one per digit). This would use only 3 Arduino pins. The TPIC6B595 can handle 12V and up to 150mA per channel. No multiplexing would be required, making your code easier. You would also need 35~40 series resistors. This would give the brightest possible display.
Alternatively use 2x TPIC6B595. One chip sinks current from the segments. The second chip drives 5x PNP transistors (or P-channel MOSFETS) to control the common anodes. Again, only 3 Arduino pins required and only 12~13 resistors. Your code becomes more complex and the display would be much less bright because of the multiplexing.
74HC595 cannot handle voltages over 5V and only small currents. But it can drive transistors which can in turn drive the display. The TPIC6B595 is very similar to 74HC595 but with 8 transistors built-in, simplifying your circuit.
Thank you so much. My basic understanding on this is to connect a pin on SER IN, SRCK and G? then the RCK I will be using a oscillator circuit? Am I correct? I am still looking at circuits and possible ways to connect it. Hopefully, I can find some example programs for this.
When you connect Uno to PC with USB cable, you are using its (only) hardware serial port. No need for software serial.
sorry but I do not understand this. my problem is the PC I am referring to is not a typical PC but a hardware that gives serial comms via rs232. I also don't know exactly how to get the data from it so I bought a rs232 to TTL.