Looping program for 4794 shiftout controller

Hey everybody,

I'm trying to sequence my shiftout controller so that each LED will come off sequentially one after another.

I've managed to get the sequence down but so far have been unable to get the program to loop.

I'm thinking i'm using the wrong type of loop (maybe an if clause instead of a for). If anybody could give me some suggestions i'd really appreciate it!

(the code is based on the shiftout program that was in the examples)

int data = 9;
int strob = 8;
int clock = 10;
int oe = 11;
int count = 0;
int dato[8] = {1,2,4,8,16,32,64,128}; // dato is a varible we use to send data to the LEDs

void setup()
//Serial.begin(9600); // uncomment the serial-related lines to monitor the program's progress
pinMode(data, OUTPUT); // declare all the control pins as outputs
pinMode(clock, OUTPUT);
pinMode(strob, OUTPUT);
pinMode(oe, OUTPUT);

// sends a pulse to the 4794 indicating that
// it is time to load data
void PulseClock(void) {
digitalWrite(clock, LOW);
digitalWrite(clock, HIGH);
digitalWrite(clock, LOW);

void loop()
//dato = 64; // if dato equals 129 the first and last LED will be on

// go through the "dato" variable and send it bit by bit over the data pin
for (int i = 0; i < 1000; i++)
for (count = 0; count < 8; count++) {
digitalWrite(data, dato[count] & 01);
//Serial.print((dato & 01) + 48, BYTE);
if (count == 7){
digitalWrite(oe, LOW);
digitalWrite(strob, HIGH);

digitalWrite(oe, HIGH);


digitalWrite(oe, HIGH);
digitalWrite(strob, LOW);


delay(200); // waits for a second
count = 0;