Está en la página 1de 2

ALUMNO: Josu Marcelo Jano

Matricula: 36123593

Fecha: 22/10/2014

-------------------------------------------------------------------------------------------------------------#ifdef __USE_CMSIS
#include "LPC17xx.h"
#endif
extern void espera (int retardo);
int retardo = 0x00100000;

// Valor del retardo

int main(void)
{
LPC_GPIO0->FIODIR |= (1 << 22); // P0[22] COMO SALIDA
while(1)
{
LPC_GPIO0->FIOCLR = (1 << 22); // P0[22] = 0
espera(retardo);

// DELAY

LPC_GPIO0->FIOSET = (1 << 22); // P0[22] = 1


espera(retardo);

// DELAY

}
return 0 ;
}

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------.syntax unified
.global espera
.type espera, function
espera:
bucle:
.end

subs r0,r0,#1
bne bucle
mov pc,lr

También podría gustarte