I don't fully understand the way you drive the 7seg displays.
I have some experience with 7seg on the PIC.
Usually, I use one table as pattern decoder (0..F, also some extra chars).
So I have a number, then I use it as index for the pattern table,
and I get the right pattern for the 7seg display.
Then I also use 4x multiplex, all via 74164 or 74595.
For this purpose I use a second table, and usually 8 phases (every second blank) but it also works for
4 phases. This sink drive table really just contains 1110,1101,1011,0111
So one of the multiplexed displays is activated for each phase.
Maybe this is not your problem and your 7seg code somehow works.
However, I find it much less intuitive than my solution.
I don't know if you can understand PIC 16 C, I have the files online:
http://pic.hitechworld.org/716pcb/
And I use inline assembler to shift out the bits, I hope the C source is not too hard to understand.
where you "say" shiftOut,
in my source it is called output_byte, and it's hardwired to port bits via defines.
I am interested to start using Atmel chips, for this purpose I read posts here on the forum,
and try to understand what is going on in the code.
Really I don't get the logic for kanaele_einer[], and int kanaele_zehner[]