Professional Documents
Culture Documents
* File: Proyecto_led.c
* Author: Haret
*
* Created on 22 de junio de 2016, 11:39
*/
// CONFIG
#pragma config FOSC = XT // Oscillator Selection bits (XT oscillator)
#pragma config WDTE = OFF // Watchdog Timer (WDT disabled)
#pragma config PWRTE = ON // Power-up Timer Enable bit (Power-up Timer is
enabled)
#pragma config CP = OFF // Code Protection bit (Code protection disabled)
#include <xc.h>
void main()
{
//CONFIGURACION DE LOS PUERTOS
TRISbitsA.TRISA0=0;//Configuracion del puerto A como salida
TRISbitsB.TRISB1=1;//Configuracion del puerto B como salida
}
TRISB.TRISB1=0;
if(RB1==1)
{
RA0=0;
}
}
goto bucle;
}