Update ES/Lab/LAB6/SHIFT.c
This commit is contained in:
parent
18d57aa241
commit
86d43c1a66
1 changed files with 7 additions and 3 deletions
|
@ -11,16 +11,20 @@ int main(){
|
||||||
|
|
||||||
while(1){
|
while(1){
|
||||||
x = 0x01000000;
|
x = 0x01000000;
|
||||||
|
|
||||||
|
// LOOP to fill 24->31 incrementally
|
||||||
for(i=0;i<8;i++){
|
for(i=0;i<8;i++){
|
||||||
LPC_GPIO1->FIOSET=x;
|
LPC_GPIO1->FIOSET=x;
|
||||||
x = x<<1;
|
x = x<<1;
|
||||||
}
|
}
|
||||||
// for(i=0; i<1000; i++);
|
// for(i=0; i<1000; i++); // delay
|
||||||
|
|
||||||
|
// LOOP to empty 24->31 incrementally.
|
||||||
x = 0x01000000;
|
x = 0x01000000;
|
||||||
for(i=0;i<8;i++){
|
for(i=0;i<8;i++){
|
||||||
LPC_GPIO1->FIOCLR=x;
|
LPC_GPIO1->FIOCLR=x;
|
||||||
x = x<<1;
|
x = x<<1;
|
||||||
}
|
}
|
||||||
// for(i=0; i<1000; i++);
|
// for(i=0; i<1000; i++); //delay
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue