26 lines
418 B
C
26 lines
418 B
C
#include <LPC17xx.h>
|
|
|
|
int main(){
|
|
unsigned long x, i;
|
|
// from P1.24 -> 31
|
|
LPC_PINCON->PINSEL3 &= 0x0000FFFF; // values
|
|
|
|
LPC_GPIO1->FIODIR = 0xFF000000;
|
|
|
|
x = 0x01000000; // new variable
|
|
|
|
while(1){
|
|
x = 0x01000000;
|
|
for(i=0;i<8;i++){
|
|
LPC_GPIO1->FIOSET=x;
|
|
x = x<<1;
|
|
}
|
|
// for(i=0; i<1000; i++);
|
|
x = 0x01000000;
|
|
for(i=0;i<8;i++){
|
|
LPC_GPIO1->FIOCLR=x;
|
|
x = x<<1;
|
|
}
|
|
// for(i=0; i<1000; i++);
|
|
}
|
|
}
|