![]() |
roboforum.ruТехнический форум по робототехнике. |
|
mihanaha писал(а):тут можно скачать рабочую версию keil uVision3
One of the hardest parts of starting a new project is selecting the right mix of compiler, assembler, and linker options for the particular chip you use. µVision provides the Device Database which makes this tedious task easy.
#include <LPC22xx.H> /* LPC22xx definitions */
void wait (void) { /* wait function */
int d;
for (d = 0; d < 1000000; d++); /* only to delay for LED flashes */
}
int main (void) {
unsigned int i; /* LED var */
PINSEL0 = 0x00000000;
PINSEL1 = 0x00000000;
PINSEL2 = 0x00000000;
FIO0DIR = 0xFF000000; /* P0.24..30 defined as Outputs */
//FIO0SET = 1<<30;
while (1) { /* Loop forever */
FIO0SET = 1<<30; /* Turn on LED */
wait (); /* call wait function */
FIO0CLR = 1<<30; /* Turn off LED */
wait (); /* call wait function */
}
}
.SCS = (1<<0)|(1<<1); IO0DIR = 0xFF000000; /* P0.24..30 defined as Outputs */
while (1) { /* Loop forever */
IO0SET = 1<<30; /* Turn on LED */
wait (); /* call wait function */
IO0CLR = 1<<30; /* Turn off LED */
wait (); /* call wait function */
}Сейчас этот форум просматривают: нет зарегистрированных пользователей и гости: 0