Update ES/Lab/LAB6/SHIFT.c

This commit is contained in:
aadit 2025-08-28 12:53:57 +05:30
parent 18d57aa241
commit 86d43c1a66

View file

@ -11,16 +11,20 @@ int main(){
while(1){
x = 0x01000000;
// LOOP to fill 24->31 incrementally
for(i=0;i<8;i++){
LPC_GPIO1->FIOSET=x;
LPC_GPIO1->FIOSET=x;
x = x<<1;
}
// for(i=0; i<1000; i++);
// for(i=0; i<1000; i++); // delay
// LOOP to empty 24->31 incrementally.
x = 0x01000000;
for(i=0;i<8;i++){
LPC_GPIO1->FIOCLR=x;
x = x<<1;
}
// for(i=0; i<1000; i++);
// for(i=0; i<1000; i++); //delay
}
}