I Always find the solutions for my issues here, but this time I couldn't, so It's the first time to post here
I hope I find a solution to my issue. According to my university, I have a project using Arduino UNO and it's required to make a 10*10 led matrix but only by using Arduino UNO and 100 led and basic gates like or, xor. I searched a lot to find the solution but all videos use different chips to handle the issue of pins number. So I want to know the best way to implement the requirement and how to control each led separately. I will attach a photo of the requirement and you can see it for more details.
First off, Thank you for ur reply
I don't know this method but I searched it and I think I will find the way to connect the LEDs together, but what about control each led separately? can you explain the idea of the code or giving me a link for it?
I just want to find a video or something else explaining the concept to be familiar with it and to start implementing it. I found how the connections can be made, but what about controlling the LEDs separately using the code? If there is an easier way please inform me.
Thank you for your understanding and consideration.
According to my university, I have a project using Arduino UNO
So this is a marked assignment and you want us to do it all for you?
We have told you about one technique, and the magic word "charlieplexing".
I just want to find a video or something else explaining the concept
When I was a University Lecturer ( known as a Professor in the US ) then I would have expected a student to do their own research to find out how it works. After all as they say "the answer's out there".
This is your project, you have to put some effort into it. A University project is all about researching and understanding what you find. Oddly enough it is not asking for the exact paper you need to read. Asking for help is one thing, wanting to be spoon fed is another. Please don't cheat.
Thank you for your understanding and consideration.
taisonmomen:
First off, Thank you for ur reply
I don't know this method but I searched it and I think I will find the way to connect the LEDs together, but what about control each led separately? can you explain the idea of the code or giving me a link for it?
OK, so we do this on the main thread, not by way of PMs.
Here is the diagram of the Charlieplexed matrix:
The horizontal lines - marked Bn in this diagram - connect to your Arduino pins. If you track it through, making any one LOW and any other one HIGH will - through a resistor - light just one LED. The other lines must not be either HIGH or LOW, they must be set to INPUTs. You can - and should - however light more than one LED by driving more than one line HIGH while a particular line is LOW.
Note that Charlieplexing allows you to drive n(n-1) LEDs with n pins.
OK, there's a whole lot for you to study - and to build your first Charlieplexed matrix to test - I suggest just as many LEDs as shown in this diagram to start with. Use 1k resistors.
If you can use basic logic gates, there is nothing to stop you from making a shift register or a multiplexer. Everything that has ever been designed in digital electronics can be made from a collection of NOR gates ( or NAND gates ).
I think that would be the "for extra credit" version!
I did something a little like that way back in Digital Logic and Systems when the homework was to demonstrate a parity and a majority function from five inputs so over the weekend I turned up with the solution on paper using multiple-input gates and EX-ORs as well as an alternative using only 4001s and a home-made PCB implementing the actual exercise with purely the 4001s, five slide switches and two LEDs. (7 resistors)
Of course I still have it in my trophy cupboard though the instructor did borrow it for a few other classes.
I think that Charlieplexing is in this case by far the more practical approach.
Paul__B:
OK, so we do this on the main thread, not by way of PMs.
Here is the diagram of the Charlieplexed matrix:
The horizontal lines - marked Bn in this diagram - connect to your Arduino pins. If you track it through, making any one LOW and any other one HIGH will - through a resistor - light just one LED. The other lines must not be either HIGH or LOW, they must be set to INPUTs. You can - and should - however light more than one LED by driving more than one line HIGH while a particular line is LOW.
Note that Charlieplexing allows you to drive n(n-1) LEDs with n pins.
OK, there's a whole lot for you to study - and to build your first Charlieplexed matrix to test - I suggest just as many LEDs as shown in this diagram to start with. Use 1k resistors.
Thank you for ur help
I will try to use it and still searching for other alternatives. I made a lot of projects or tasks like that but the problem was with switches and I could handle them through using resistance with different values to differentiate between switches. This time, I have the same problem but it is for the output pins, so I posted here. I knew the Arduino this semester only and I'm trying to do my best.
Grumpy_Mike:
If you can use basic logic gates, there is nothing to stop you from making a shift register or a multiplexer. Everything that has ever been designed in digital electronics can be made from a collection of NOR gates ( or NAND gates ).
Thank you for ur reply and consideration
Can you kindly tell me how I can handle this If I used the design of the 10*10 LEDs matrix?
Because I tried it before searching for another solution but I found that I had to connect 20 pins while I only have 19 pins
Can you kindly tell me how I can handle this If I used the design of the 10*10 LEDs matrix?
You use logic gates to make a couple of 10 bit shift registers with latches and use them in the conventional way to address a matrix. You only need three pins per shift register.
Or you use them to make a latch to give you extra output pins.
Slightly OT, but what is this mania for 'watching videos'? Reading and re-reading a written work is far superior to watching some wannabe TV star waffling on. With written material, one can read and re-read, print excerpts and thoroughly digest it anywhere, even in the bath. It can also be done without irritating everyone else in the room.