Design a circuit using 10 LEDs with ARM ASSEMBLY CODE that works with Rasberry Pi. The LEDs blink in any pattern
Explain the code.
#include<lpc214x.h> | |
void delay (int); | |
void delay (int i) | |
{ | |
T0TCR=0x02; | |
T0TCR=0x01; | |
while (T0TC < i); | |
T0TCR=0x00; | |
} | |
int main() | |
{ | |
PINSEL2=0x00; | |
IODIR1=0xFFFFFFFF; | |
PLL0CON = 0x01; | |
PLL0CFG = 0x24; | |
PLL0FEED = 0xAA; | |
PLL0FEED = 0x55; | |
while(!(PLL0STAT & 0x00000400)); | |
PLL0CON = 0x03; | |
PLL0FEED = 0xAA; | |
PLL0FEED = 0x55; | |
VPBDIV = 0x01; | |
T0CTCR=0x00; | |
T0PR=59999; | |
T0TCR=0x02; | |
while(1) | |
{ | |
IOSET1=0xFFFFFFFF; | |
delay(1000); | |
IOCLR1=0xFFFFFFFF; | |
delay(1000); | |
} | |
} |
Get Answers For Free
Most questions answered within 1 hours.