7-segment driving circuit not working as expected
From a first look and a glance at the datasheet, generally speaking this seems fine. But the Arduino isn't exactly nippy at changing those outputs and while they are changing (with LE low), the outputs will also be changing. Could that be what you mean by "flashing" display? I'd guess that the display isn't really flashing per-se, it's just changing slowly enough for you to see it as a big mess.

I would suggest setting pin 8 HIGH to begin with - which will block any changes from the BCD pins - then changing all the BCD outputs and finally setting pin 8 LOW to reflect those changes. Then delay and loop. Something like this maybe:

Important note from your code: In C at least, &amp; has lower precedence than !=. So the expression:

i &amp; 0x1 != 0


resolved as if you'd typed:

i &amp; (0x1 != 0)


which is:

i &amp; 1


That's a trap I've seen before. Use brackets to clearly state what you mean and always do so where &amp; and | is concerned, especially if there's an == or != nearby. I've changed it below:

  ...
  for( int i = 0; i &lt; 10; ++i )
  {
    digitalWrite( 8, HIGH );
    digitalWrite( 2, ((i &amp; 0x0001) != 0) ? HIGH : LOW );
    digitalWrite( 3, ((i &amp; 0x0002) != 0) ? HIGH : LOW );
    digitalWrite( 4, ((i &amp; 0x0004) != 0) ? HIGH : LOW );
    digitalWrite( 5, ((i &amp; 0x0008) != 0) ? HIGH : LOW );
    digitalWrite( 8, LOW );
    delay( 1000 );
  }