O que tem de errado?
- Código: Selecionar todos
#include <stdio.h> /* prototype declarations for I/O functions */
#include <LPC21xx.H> /* LPC21xx definitions */
int h = 0;
int v = 0;
long color;
void wait (void) { /* wait function */
int d;
for (d = 0; d < 1000; d++); /* only to delay for LED flashes */
}
int main (void) {
//unsigned int i; /* LED var */
unsigned int clockup;
IODIR1 = 0x00FF0000; /* P1.16..23 defined as Outputs */
/* initialize the serial interface */
// PINSEL0 = 0x00050000; /* Enable RxD1 and TxD1 */
// U1LCR = 0x83; /* 8 bits, no Parity, 1 Stop bit */
// U1DLL = 97; /* 9600 Baud Rate @ 15MHz VPB Clock */
// U1LCR = 0x03; /* DLAB = 0 */
clockup = 0x40;
// printf ("Hello World \n"); /* the 'printf' function call */
while (1) { /* An embedded program does not stop and */
/* ... */
/* never returns. We use an endless loop. */
IOCLR1 = 0x40;
if(v == 100) {
IOSET1 = 0x43;
}
if(v == 500) {
IOSET1 = 0x4C;
}
IOSET1 = 0x40;
if(v == 799) {
v = 0;
h++;
}
if(h == 599) {
h = 0;
}
v++;
}
}