Go Down

Topic: Matrix problem (Read 2581 times) previous topic - next topic

PaulRB

When using the SPI feature on Arduino, its important to make sure that the "SS" pin is an output not an input. This tells the Arduino that it is the SPI master not a slave. So you might as well use that pin for the '595 latch pins.

Grumpy_Mike

ok,that makes sense, except for the latch pin of the 595, does that has a special output as well ?
The latch pin has nothing to do with the SPI protocol, you add it as an extra pulse after you have shifted data into the shift register.

bogdan666


bogdan666

ok, final rewiring
-data digital pin 11
-clock digital pin 13
-latch digital pin 10

PaulRB

Next I would suggest writing a new, very simple sketch to light all LEDs using the SPI library.

bogdan666

well, since i never used a library before, i will do some research about it.

PaulRB

It's a standard Arduino library, comes with the IDE, so you won't need to download it or use the library manager.

bogdan666

yeah, i found that out, but that doesn't make it any more easier to me. I still don't quite understand this shift register thing.

PaulRB

What don't you understand?


bogdan666

That is way too complicated for me...the closest thing to understanding how shift registers work, was a youtube tutorial with a guy which put 595 with push buttons, that made it clear, so i don't understand how this library thing works, if it was after me i would put every pin high and low manually, and i would still scratch my head because multiplexing is missing, i tried finding other codes for matrix with spi, but i didn't find any.

PaulRB

The SPI library does the same thing as when the YouTube guy used switches and pushbuttons. But much, much faster

I think you jumped into the deep end of the pool when you cannot swim. You must start with more basic projects and tutorials and build up your knowledge and experience at a pace that suits you.

Paul__B

And I think I addressed it adequately in #9.

bogdan666

Everything i learned was trough experimenting, jumping into a big pool, i will get there, it's going to be harder but i will get there faster. You helped me a lot in this project, and i thank you for that. i am only one code away from the end, this is my hobby, i don't know any programming, and the electronics part i learned also along the way, mistakes were made, lessons were learned.
first time i saw an arduino i didn't understand a thing, but by looking at the code it makes sense somehow.
if you want to help me out further i will be very thankful, if not, i am thankful so far and i will continue to learn stuff as always.

PaulRB

+1 Karma for your patience and determination.

I will continue to help. If you want, I can suggest some code lines. But I must be careful that you understand each line of that code, and you don't just accept it without questioning it.

Go Up