#include "all.h"
void setup() {
// put your setup code here, to run once:
init_port();
}
void loop() {
// put your main code here, to run repeatedly:
char x;
volatile long i;
//right to left
for(x=8;x>0;x--){ //this is from left to right MSB to LSB
output((1<<x)); // here intially for x=8 output is 1000 000 then subseq 1 is shifted from this 0000 0001
for(i=0; i<600000 ; i++);
}
for(x=0;x<8;x++){ //this is from right to left LSB to MSB
output((1<<x));
for(i=0;i<600000 ; i++);
}
}