Documentos de Académico
Documentos de Profesional
Documentos de Cultura
Matricula: 36123593
Fecha: 22/10/2014
-------------------------------------------------------------------------------------------------------------#ifdef __USE_CMSIS
#include "LPC17xx.h"
#endif
extern void espera (int retardo);
int retardo = 0x00100000;
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
// DELAY
}
return 0 ;
}
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------.syntax unified
.global espera
.type espera, function
espera:
bucle:
.end
subs r0,r0,#1
bne bucle
mov pc,lr