void setup() {
// put your setup code here, to run once:
volatile char*dirf;
dirf=0x30;
volatile char*outf;
outf=0x31;
}
void loop() {
// put your main code here, to run repeatedly:
char a=0x80 ,b ;
volatile char i;
volatile long m;
volatile char*outf;
outf=0x31;
for( int i = 0; i < 3; i++) {
b = (a >> 1) ;
a=b;
*outf=a;
for(m=0;m< 200000;m++);
}
}
/*Glow the ODD LEDs one by one (Do not off the LED)
for(int i = 0; i < 8; i++) {
b = (a << 2) | 0x02; // Shift left and set LSB to 1
a = b;
*outf=a;
for(m=0;m< 200000;m++);
}
}
/*/
/* code for Glow the EVEN LEDs one by one (Do not off the LED)
for(int i = 0; i < 8; i++) {
b = (a << 2) | 0x01; // Shift left and set LSB to 1
a = b;
*outf=a;
for(m=0;m< 200000;m++);
}
}
/*/
/*
for(i=0;i<=7;i++)
{
b = c | (x << i);
// for(m=0;m< 180000;m++);
*outf=b;
}
*/
/* Code for 3. Glow the LEDs one by one (Do not off the LED)
for(int i = 0; i < 8; i++) {
b = (a << 1) | 0x01; // Shift left and set LSB to 1
a = b;
*outf=a;
for(m=0;m< 200000;m++);
}
/*/