Hehe ok, don't worry my friend. My "customer" always do that too.
Very well, updating the topic, i've changed the positions on my breadboard for the 3rd time. The display now turn all digits ON
when i run the code (the original one
, published by @agent57), BUT, this only happens when i take away the 5V of the 19th pin of max7219
. (very strange!!) It work as following details:
- - When i take away the 5V from the raspberry Pi (physical pin #2) and run the code in test mode: All segments lights on. (where's the power are coming from? I discovered that its probably from the 3v3 of GPIOs, but don't know why the display turn all the digits ON without supplying the pin 19 and the 18 - remember they're sharing the same 5V from pi.)
- Now, when I put the 5V in the right place again and run the code in test mode: Each digit of display only tries/threaten to light up for some miliseconds and turn off, one at time: I run the code, the 1st digit just blinks quickly. I run the code again, the 2nd digit just blinks quickly ... And so on, successively. Maybe its irrelevant to say that the "digit blink" is more precise when have only a 10k resistor in max7219 pin 18. When have 10k + 10k the blink's behavior is very strange, only 4º digit blinks with precision. The other digits appears to be glitched, with low power or something else that i don't know how to explain! So, i let only 10k resistor.
Now, still with all the wires setup corretly again. The important part:
Changing the software code (the original one) to send any number to an any digit of display obviously without the testing mode set to 1, some random segments only blinks
(initially with an almost transparent color, but i increased the intensity value to 10 and solved this). As if the segments outputs of the max7219 weren't set correctly, but i viewed the datasheet and the wiring one hundred times. See the attached image in this post.
When i sent the number 2 to digit 1 with the command MAX7219Send(2,2)
, for the first time all the 4 digits of display turned ON and keeped enlightened only the G segment. Except of digit 1, that lights only the segment F. But after i rebooted the Pi, the effect became different again: Some segments of display only blinks quickly and once at each time i run the software.
if i change the command to MAX7219Send(2,3)
, the leds of display shuts down. if i run the command again, only blinks.
I made a loop via shell command linux, and noticed that blinking this way, is formed a digit from 0-9 in the first digit of display. (but only works when i send a number to the digit 1). The other digits doesn't work. I tried for example "MAX7219Send(0x02,3)", doesn't work. I saw only random segments, even blinking. In another words, the situation is very strange!
I did the same tests using your improved code
, sometimes random digits blinks. sometimes random segments blink. I ran it several times, the errors i said in early post also persists.
I suppose is not too late to say that I'm using the model 5461AS of 7-segment 4-digit display. To knowledge effect, here's datasheet i've found:
http://pdf.datasheetarchive.com/indexer ... X27120.pdf