I would like to drive a 8 digits 7 segment display (8 segment to be precise as THere's also the dot).I've read a couple of things about the 74HC595 wich seemed to be used on the little shield I get from Internet (http://www.miniinthebox.com/8-x-seven-segment-displays-module-for-arduino-595-driver_p411869.html) and it seemed complex but not so crazy.

At the first try I get unexpeted and random results.I was thinking I had to drive a 64 positions register each one related to each segment but... now it's clear that's not the game I have to play.In addition, taking a look at the two 4 digit display I can see that each has just 12 pins under each block of segment (24 in total) so there should be some kind of multiplexing I have to deal with to light the segment I cannot figure out.

-- Do anyone has already worked with this shield? (I cannot find out any tech document)

-- Do you know how many bits I have to deal with while eriting to the register before sending HIGH to the RCLK pin?

-- Is there any documentation around I can use to understand how to send data to the register as lo light the segment I want lo light?

Is there any documentation on the part?5 control pins - +5, Gnd, Clock, Data, Latch?One shift register likely controlling the segments, one controlling which digit is selected.So the game:send out 2 bytes, one will have segment info, one will have digit control.

>One shift register likely controlling the segments, one controlling which digit is selected.>So the game: >send out 2 bytes, one will have segment info, one will have digit control.

Not understood.If I try to send to send 24 bit (just fgured out thinkng of the 24 pin I can see under the digits), when I send High to 9 to 16 position I light the full segment (each bit lights an entire segment) but nothing happens if, at the same time, I set any of the bits from 1 to 8.Is this related to what yore saying?

This evening I'm going to read what you wrote in peace but..... do this means that I can write one digit a time so I need a lot of speed writing all the digits and rely on the persistence of my eye to get the whole 8 digits?

unsigned long currentmillis(); // millis() and micros() are type unsigned long, 0x00000000 to 0xFFFFFFFFunsigned long previousmillis();unsigned long duration = 4; // time in mS to display each digit// declare other variables, and arrays discussed earlier

x=x+1; // break down for:next loop so it can run within the time checkif (x==8){x=0; // reset after passing 7}digitalWrite(latchPin, LOW); // bring the shift register latch pin lowshiftout(dataPin, clockPin, MSBFIRST,fontArray[x]); // shift out the segment infoshiftout(dataPin, clockPin, MSBFIRTS, digitArray[x]); // shift out the digit select infodigitalWrite(latchPin, HIGH); // bring the shift register latch pin high, moves the data to the outputs} // end time check// do other stuff if desired while waiting for next time check} // end void loop

Still using the bitRead() fuction (understood it's not the func for this job), still few problems with the delay, still to reengineer as to work in an environment where the main objective is something else, still to reorganize as to be used as a 'black box library' but... my main problem is behind.

Let's say the first time you come to Italy (if not already here) you get a serious bottle of wine.

1) set up a timer isr that fires periodically. I think a 100hz refresh rate more than works for everyone. That means you need to refresh each digit about 1-2ms.2) in the timer isr, keep track of which digit you are refreshing and pick up the font / segment information from a display buffer.

Once that is setup, the whole thing runs entirely in the background, regardless of what you do in the loop(). All you need to do there is to stuff the segment information into the display buffer, and the isr will take care of refreshing the leds.

I don't have a precise project to work on but just spending time trying to learn something so I'm I'd be happy to try different approach.As I neither know what a timer isr is I'll google around at first... any link to example or whatever can bu usefull for a beginner?

As configured, it drives a 8-digit 7-segment common anode display. The digits are updated once every 1ms (user configurable). All user needs to do is to fill lRAM with the data and it will be updated on the led display. You can generate a library (two actually, one for the timer and one for the display) from this to make your life easier.

You can easily change it to suit your own display types. You will notice that I used a very long delay() in the loop() to show how it is unaffected.

In case you want to know, led8_display() can also be called in the loop to update the display - if you don't want to enable interrupts.

After your post I begun reading about Interrupts, Timer, ISR and some other of this stuff...

I'm quite ready to begin my first test but, it's incledibile, my worst nightmare now is how to installa the AVR-libc library... seems something I have to compile on my own and, anyway, the documentation isnt very friendly (to my knowledge).